[Feature] Allow creating PRs from formatted patches #6289

Open
opened 2025-11-02 06:51:09 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Seirdy on GitHub (Nov 10, 2020).

Requested feature

git format-patch turns a commit into a patch ready to email. These patches can be applied by the recipient with git am. It would be nice if Gitea could allow uploading a formatted patch to create a PR

Rationale

1. Convenience

Creating a PR with formatted patches simplifies the contribution process.

The existing flow:

  1. Fork the repo
  2. Clone the fork
  3. (optional, recommended) check out a new branch
  4. Make commits
  5. Push commits
  6. Click a link to open an online form for a new PR
  7. Fill out the PR form
  8. Submit the PR

The flow that this change will allow:

  1. Clone the upstream repo (often already done)
  2. (optional, recommended) check out a new branch
  3. Make commits
  4. git format-patch
  5. Drag and drop those patch files onto the repo
  6. Confirm and submit.

2. Allows contribution without a Gitea account

The best part is that a Gitea admin and repo owner could allow patch files to be submitted without an account, significantly lowering the barrier to entry.

This can also be a big step towards the overall goal of federated PRs by taking the email approach. See https://github.com/go-gitea/gitea/issues/13442#issuecomment-724990741

Originally created by @Seirdy on GitHub (Nov 10, 2020). Requested feature ----------------- `git format-patch` turns a commit into a patch ready to email. These patches can be applied by the recipient with `git am`. It would be nice if Gitea could allow uploading a formatted patch to create a PR Rationale --------- ### 1. Convenience Creating a PR with formatted patches simplifies the contribution process. The existing flow: 1. Fork the repo 2. Clone the fork 3. (optional, recommended) check out a new branch 4. Make commits 5. Push commits 6. Click a link to open an online form for a new PR 7. Fill out the PR form 8. Submit the PR The flow that this change will allow: 1. Clone the upstream repo (often already done) 2. (optional, recommended) check out a new branch 3. Make commits 4. `git format-patch` 5. Drag and drop those patch files onto the repo 6. Confirm and submit. ### 2. Allows contribution without a Gitea account The best part is that a Gitea admin and repo owner could allow patch files to be submitted without an account, significantly lowering the barrier to entry. This can also be a big step towards the overall goal of federated PRs by taking the email approach. See <https://github.com/go-gitea/gitea/issues/13442#issuecomment-724990741>
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 06:51:09 -06:00
Author
Owner

@zeripath commented on GitHub (Nov 10, 2020):

See #10007

Just need some help getting the UI sorted

@zeripath commented on GitHub (Nov 10, 2020): See #10007 Just need some help getting the UI sorted
Author
Owner

@SamWhited commented on GitHub (Aug 19, 2022):

Now that #17902 is merged this is done (you can create a branch from a patch). However, it would be nice to have the ability to do this directly from the new pull request view (where it will be much more discoverable). Maybe this issue can also be used to track the UI from both directions (ie. right now we have the ability to create a pull request from the apply patch view, we should also have the ability to use a patch instead of a branch from the new pull request view)

EDIT: also the feature as merged is slightly different from this request. Only people with commit privileges can apply patches right now; it would be nice if people without could still create PRs or submit the patch some other way for consideration.

@SamWhited commented on GitHub (Aug 19, 2022): Now that #17902 is merged this is done (you can create a branch from a patch). However, it would be nice to have the ability to do this directly from the new pull request view (where it will be much more discoverable). Maybe this issue can also be used to track the UI from both directions (ie. right now we have the ability to create a pull request from the apply patch view, we should also have the ability to use a patch instead of a branch from the new pull request view) **EDIT:** also the feature as merged is slightly different from this request. Only people with commit privileges can apply patches right now; it would be nice if people without could still create PRs or submit the patch some other way for consideration.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6289