Skip to content

Commit 2cc8d2f

Browse files
committed
Generalize merge conflict message
1 parent 4d48344 commit 2cc8d2f

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ integration service such as [Travis CI], [Appveyor] or [Buildbot].
1515

1616
Let's take Travis CI as an example. If you send a pull request to a repository,
1717
Travis CI instantly shows you the test result, which is great. However, after
18-
several other pull requests are merged into the `master` branch, your pull
19-
request can *still* break things after being merged into `master`. The
18+
several other pull requests are merged into the default branch, your pull
19+
request can *still* break things after being merged into the default branch. The
2020
traditional continuous integration solutions don't protect you from this.
2121

2222
In fact, that's why they provide the build status badges. If anything pushed to
23-
`master` is completely free from any breakage, those badges will **not** be
23+
the default branch is completely free from any breakage, those badges will **not** be
2424
necessary, as they will always be green. The badges themselves prove that there
2525
can still be some breakages, even when continuous integration services are used.
2626

@@ -30,7 +30,7 @@ merge*, not just after the pull request is received. You can manually click the
3030
automate this process. It listens to the pull request comments, waiting for an
3131
approval comment from one of the configured reviewers. When the pull request is
3232
approved, Homu tests it using your favorite continuous integration service, and
33-
only when it passes all the tests, it is merged into `master`.
33+
only when it passes all the tests, it is merged into the default branch.
3434

3535
Note that Homu is **not** a replacement of Travis CI, Buildbot or Appveyor. It
3636
works on top of them. Homu itself doesn't have the ability to test pull

homu/main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -938,16 +938,17 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg,
938938

939939
desc = 'Merge conflict'
940940
comment = (
941-
'This pull request and the master branch diverged in a way that cannot'
942-
' be automatically merged. Please rebase on top of the latest master'
941+
'This pull request and the default branch diverged in '
942+
'a way that cannot'
943+
' be automatically merged. Please rebase on top of the latest default'
943944
' branch, and let the reviewer approve again.\n'
944945
'\n'
945946
'<details><summary>How do I rebase?</summary>\n\n'
946947
'Assuming `self` is your fork and `upstream` is this repository,'
947948
' you can resolve the conflict following these steps:\n\n'
948949
'1. `git checkout {branch}` *(switch to your branch)*\n'
949-
'2. `git fetch upstream master` *(retrieve the latest master)*\n'
950-
'3. `git rebase upstream/master -p` *(rebase on top of it)*\n'
950+
'2. `git fetch upstream HEAD` *(retrieve the latest HEAD)*\n'
951+
'3. `git rebase upstream/HEAD -p` *(rebase on top of it)*\n'
951952
'4. Follow the on-screen instruction to resolve conflicts'
952953
' (check `git status` if you got lost).\n'
953954
'5. `git push self {branch} --force-with-lease` *(update this PR)*\n\n'
@@ -1335,7 +1336,7 @@ def start_build(state, repo_cfgs, buildbot_slots, logger, db, git_cfg):
13351336
continue
13361337
builders += ['status-' + key]
13371338
# We have an optional fast path if the Travis test passed
1338-
# for a given commit and master is unchanged, we can do
1339+
# for a given commit and main is unchanged, we can do
13391340
# a direct push.
13401341
if context == 'continuous-integration/travis-ci/push':
13411342
found_travis_context = True

0 commit comments

Comments
 (0)