From 07ffa7dda713b019a3d8b8bd46094bf39a7e6ddb Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Tue, 29 Dec 2020 13:02:14 -0500 Subject: [PATCH] docs: clarify squash/merge vs rebase/merge --- docs/Maintainer-Guidelines.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/Maintainer-Guidelines.md b/docs/Maintainer-Guidelines.md index 93b1c219e6..2e4462d451 100644 --- a/docs/Maintainer-Guidelines.md +++ b/docs/Maintainer-Guidelines.md @@ -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 @@ Here’s 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.