From: Jonathan Nieder Date: Sun, 21 Mar 2010 00:52:21 +0000 (-0500) Subject: merge-recursive: add a label for ancestor X-Git-Tag: v1.7.1-rc0~15^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ca56aa07619b0345b643e52ae8e616cbaafc187;p=git.git 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 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/merge-recursive.c b/merge-recursive.c index 017cafddd..917397ca7 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1347,6 +1347,7 @@ int merge_recursive(struct merge_options *o, if (!o->call_depth) read_cache(); + o->ancestor = "merged common ancestors"; clean = merge_trees(o, h1->tree, h2->tree, merged_common_ancestors->tree, &mrtree);