6 git-merge-index - Runs a merge for files needing merging
11 'git-merge-index' [-o] [-q] <merge-program> (-a | \-- | <file>\*)
15 This looks up the <file>(s) in the index and, if there are any merge
16 entries, passes the SHA1 hash for those files as arguments 1, 2, 3 (empty
17 argument if no file), and <file> as argument 4. File modes for the three
18 files are passed as arguments 5, 6 and 7.
23 Do not interpret any more arguments as options.
26 Run merge against all files in the index that need merging.
29 Instead of stopping at the first failed merge, do all of them
30 in one shot - continue with merging even when previous merges
31 returned errors, and only return the error code after all the
35 Do not complain about failed merge program (the merge program
36 failure usually indicates conflicts during merge). This is for
37 porcelains which might want to emit custom messages.
39 If "git-merge-index" is called with multiple <file>s (or -a) then it
40 processes them in turn only stopping if merge returns a non-zero exit
43 Typically this is run with the a script calling git's imitation of
44 the merge command from the RCS package.
46 A sample script called "git-merge-one-file" is included in the
49 ALERT ALERT ALERT! The git "merge object order" is different from the
50 RCS "merge" program merge object order. In the above ordering, the
51 original is first. But the argument order to the 3-way merge program
52 "merge" is to have the original in the middle. Don't ask me why.
56 torvalds@ppc970:~/merge-test> git-merge-index cat MM
57 This is MM from the original tree. # original
58 This is modified MM in the branch A. # merge1
59 This is modified MM in the branch B. # merge2
60 This is modified MM in the branch B. # current contents
64 torvalds@ppc970:~/merge-test> git-merge-index cat AA MM
65 cat: : No such file or directory
66 This is added AA in the branch A.
67 This is added AA in the branch B.
68 This is added AA in the branch B.
69 fatal: merge program failed
71 where the latter example shows how "git-merge-index" will stop trying to
72 merge once anything has returned an error (i.e., "cat" returned an error
73 for the AA file, because it didn't exist in the original, and thus
74 "git-merge-index" didn't even try to merge the MM thing).
78 Written by Linus Torvalds <torvalds@osdl.org>
79 One-shot merge by Petr Baudis <pasky@ucw.cz>
83 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
87 Part of the gitlink:git[7] suite