@matheusbsbs / matheus-bagliano / commits / dee48c3c7e
Fork 0

git-merge: document but discourage the historical syntax

Historically "git merge" took its command line arguments in a rather strange order. Document the historical syntax, and also document clearly that it is not encouraged in new scripts. There is no reason to deprecate the historical syntax, as the current code can sanely tell which syntax the caller is using, and existing scripts by people do use the historical syntax. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Oct 30, 2007 at 11:54 UTC dee48c3c7ed7f7a32a524e8a492c6bc4e3c1c78d
1 file changed +6 -5
Documentation/git-merge.txt
+6 -5
@@ -11,26 +11,27 @@ SYNOPSIS
11 [verse]
12 'git-merge' [-n] [--summary] [--no-commit] [--squash] [-s <strategy>]...
13 [-m <msg>] <remote> <remote>...
14 +'git-merge' <msg> HEAD <remote>...
15
16 DESCRIPTION
17 -----------
18 This is the top-level interface to the merge machinery
19 which drives multiple merge strategy scripts.
20
21 +The second syntax (<msg> `HEAD` <remote>) is supported for
22 +historical reasons. Do not use it from the command line or in
23 +new scripts. It is the same as `git merge -m <msg> <remote>`.
24 +
25
26 OPTIONS
27 -------
28 include::merge-options.txt[]
29
25 -<msg>::
30 +-m <msg>::
31 The commit message to be used for the merge commit (in case
32 it is created). The `git-fmt-merge-msg` script can be used
33 to give a good default for automated `git-merge` invocations.
34
30 -<head>::
31 - Our branch head commit. This has to be `HEAD`, so new
32 - syntax does not require it
33 -
35 <remote>::
36 Other branch head merged into our branch. You need at
37 least one <remote>. Specifying more than one <remote>