path: root/t/
diff options
authorJunio C Hamano <>2008-08-28 08:10:04 (GMT)
committerJunio C Hamano <>2008-08-31 02:41:43 (GMT)
commite0af48e49682ea3345f932f6b9e7fa7c5e5e611a (patch)
tree43cd383edc42ef508071fa6886a9e1fe10a7d281 /t/
parentf2b25dd81f4ccbf42700bd15feeb2becf10331ab (diff)
xdiff-merge: optionally show conflicts in "diff3 -m" style
When showing conflicting merges, we traditionally followed RCS's merge output format. The output shows: <<<<<<< postimage from one side; ======= postimage of the other side; and >>>>>>> Some poeple find it easier to be able to understand what is going on when they can view the common ancestor's version, which is used by "diff3 -m", which shows: <<<<<<< postimage from one side; ||||||| shared preimage; ======= postimage of the other side; and >>>>>>> This is an initial step to bring that as an optional feature to git. Only "git merge-file" has been converted, with "--diff3" option. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 37 insertions, 0 deletions
diff --git a/t/ b/t/
index f674c48..20786ce 100755
--- a/t/
+++ b/t/
@@ -161,4 +161,41 @@ test_expect_success 'ZEALOUS_ALNUM' '
+cat >expect <<\EOF
+Dominus regit me,
+<<<<<<< new8.txt
+et nihil mihi deerit;
+In loco pascuae ibi me collocavit;
+super aquam refectionis educavit me.
+et nihil mihi deerit.
+In loco pascuae ibi me collocavit,
+super aquam refectionis educavit me;
+et nihil mihi deerit,
+In loco pascuae ibi me collocavit --
+super aquam refectionis educavit me,
+>>>>>>> new9.txt
+animam meam convertit,
+deduxit me super semitas jusitiae,
+propter nomen suum.
+Nam et si ambulavero in medio umbrae mortis,
+non timebo mala, quoniam TU mecum es:
+virga tua et baculus tuus ipsa me consolata sunt.
+test_expect_success '"diff3 -m" style output' '
+ test_must_fail git merge-file -p --diff3 \
+ new8.txt new5.txt new9.txt >actual &&
+ test_cmp expect actual