docs: clarify squash/merge vs rebase/merge

This commit is contained in:
Rylan Polster 2020-12-29 13:02:14 -05:00
parent 5f7c369bc8
commit 07ffa7dda7

View File

@ -26,7 +26,7 @@ This is all that really matters:
[pip](https://pip.pypa.io/en/stable/).
- Ensure that any dependencies are accurate and minimal. We don't need to
support every possible optional feature for the software.
- Use the GitHub squash & merge workflow where bottles aren't required.
- Use the GitHub squash & merge or rebase & merge workflows where bottles aren't required.
- Use `brew pr-publish` or `brew pr-pull` otherwise, which adds messages to auto-close pull requests and pull bottles built by the Brew Test Bot.
- Thank people for contributing.
@ -62,7 +62,7 @@ We now accept versioned formulae as long as they [meet the requirements](Version
### Merging, rebasing, cherry-picking
Merging should be done in the `Homebrew/brew` repository to preserve history & GPG commit signing,
and squash/merge via GitHub should be used for formulae where those formulae
and squash/merge or rebase/merge via GitHub should be used for formulae where those formulae
don't need bottles or the change does not require new bottles to be pulled.
Otherwise, you should use `brew pr-pull` (or `rebase`/`cherry-pick` contributions).
@ -80,6 +80,13 @@ Heres a flowchart for managing a PR which is ready to merge:
![Flowchart for managing pull requests](assets/img/docs/managing-pull-requests.drawio.svg)
Here are guidelines about when to use squash & merge versus rebase & merge. These options should only be used when bottles are not needed.
| | PR modified a single formula | PR modifies multiple formulae |
|---|---|---|
| **Commits look good** | rebase & merge _or_ squash & merge | rebase & merge |
| **Commits need work** | squash & merge | manually merge using the command line |
### Testing
We need to at least check that it builds. Use the [Brew Test Bot](Brew-Test-Bot.md) for this.