diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-03-20 19:42:51 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-20 20:36:11 -0700 |
commit | c4151629e7019d072cefdac992e164820ce9ed1c (patch) | |
tree | b86266d989ce2ef2b8723fca49358aee8c55b1ae /t | |
parent | merge_trees(): add ancestor label parameter for diff3-style output (diff) | |
download | tgif-c4151629e7019d072cefdac992e164820ce9ed1c.tar.xz |
checkout -m --conflict=diff3: add a label for ancestor
git checkout --merge --conflict=diff3 can be used to present conflict
hunks including text from the common ancestor. The added information
is helpful for resolving a merge by hand, and merge tools tend to
understand it because it is very similar to what ‘diff3 -m’ produces.
Unlike current git, diff3 -m includes a label for the merge base on
the ||||||| line, and unfortunately, some tools cannot parse the
conflict hunks without it. Humans can benefit from a cue when
learning to interpreting the format, too. Mark the start of the text
from the old branch with a label based on the branch’s name.
git rerere does not have trouble parsing this output and its preimage
ids are unchanged since it includes its own code for recreating
conflict hunks. No other code in git tries to parse 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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7201-co.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh index f3f0c4cfdc..1337fa5a22 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -209,7 +209,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' ' a c e - ||||||| + ||||||| master a b c |