Skip to content

Commit dc18ead

Browse files
miallogitster
authored andcommitted
Documentation/git-merge.txt: fix reference to synopsis
437591a combined the synopsis of "The second syntax" (meaning `git merge --abort`) and "The third syntax" (for `git merge --continue`) into this single line: git merge (--continue | --abort | --quit) but it was still referred to when describing the preconditions that have to be fulfilled to run the respective actions. In other words: References by number are no longer valid after a merge of some of the synopses. Also the previous version of the documentation did not acknowledge that `--no-commit` would result in the precondition being fulfilled (thanks to Elijah Newren and Junio C Hamano for pointing that out). This change also groups `--abort` and `--continue` together when explaining the prerequisites in order to avoid duplication. Helped-by: René Scharfe <[email protected]> Signed-off-by: Michael Lohmann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 564d025 commit dc18ead

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Documentation/git-merge.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,21 @@ a log message from the user describing the changes. Before the operation,
4646
D---E---F---G---H master
4747
------------
4848

49-
The second syntax ("`git merge --abort`") can only be run after the
50-
merge has resulted in conflicts. 'git merge --abort' will abort the
51-
merge process and try to reconstruct the pre-merge state. However,
52-
if there were uncommitted changes when the merge started (and
53-
especially if those changes were further modified after the merge
54-
was started), 'git merge --abort' will in some cases be unable to
55-
reconstruct the original (pre-merge) changes. Therefore:
49+
A merge stops if there's a conflict that cannot be resolved
50+
automatically or if `--no-commit` was provided when initiating the
51+
merge. At that point you can run `git merge --abort` or `git merge
52+
--continue`.
53+
54+
`git merge --abort` will abort the merge process and try to reconstruct
55+
the pre-merge state. However, if there were uncommitted changes when the
56+
merge started (and especially if those changes were further modified
57+
after the merge was started), `git merge --abort` will in some cases be
58+
unable to reconstruct the original (pre-merge) changes. Therefore:
5659

5760
*Warning*: Running 'git merge' with non-trivial uncommitted changes is
5861
discouraged: while possible, it may leave you in a state that is hard to
5962
back out of in the case of a conflict.
6063

61-
The third syntax ("`git merge --continue`") can only be run after the
62-
merge has resulted in conflicts.
63-
6464
OPTIONS
6565
-------
6666
:git-merge: 1

0 commit comments

Comments
 (0)