]> git.ipfire.org Git - thirdparty/git.git/commit - merge-recursive.c
merge-recursive: add a label for ancestor
authorJonathan Nieder <jrnieder@gmail.com>
Sun, 21 Mar 2010 00:52:21 +0000 (19:52 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Mar 2010 03:36:11 +0000 (20:36 -0700)
commit7ca56aa07619b0345b643e52ae8e616cbaafc187
tree4fb84783c1d1fa36e68c53206cce84b23e7b1318
parentbf975d379d79ab0eb9e8835af4abab4712e71dad
merge-recursive: add a label for ancestor

git merge-recursive (and hence git merge) will present conflict hunks
in output something like what ‘diff3 -m’ produces if the
merge.conflictstyle configuration option is set to diff3.
There is a small difference from diff3: diff3 -m includes a label
for the merge base on the ||||||| line.

Tools familiar with the format and humans unfamiliar with the format
both can benefit from such a label.  So mark the start of the text
from the merge bases with the heading "||||||| merged common
ancestors".

It would be nicer to use a more informative label.  Perhaps someone
will provide one some day.

git rerere does not have trouble parsing the new output, and its
preimage ids are unchanged since it has its own code for re-creating
conflict hunks.  No other code in git parses conflict hunks.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c