diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-24 12:21:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-24 12:21:45 -0700 |
commit | 49ac7358da163b0f8a32ce71723b2071f962d3fd (patch) | |
tree | 7fc5bde677564c024ea04b583e9b109f127dd742 /t/t6026-merge-attr.sh | |
parent | 6da9f888daab2d18c1e5ae8252f631d38fb80e8a (diff) | |
parent | ef45bb1f8156030446658d5bfb3983ce214a9e16 (diff) | |
download | git-49ac7358da163b0f8a32ce71723b2071f962d3fd.tar.gz git-49ac7358da163b0f8a32ce71723b2071f962d3fd.tar.xz |
Merge branch 'jc/ll-merge-expose-path'
Traditionally, external low-level 3-way merge drivers are expected
to produce their results based solely on the contents of the three
variants given in temporary files named by %O, %A and %B on their
command line. Additionally allow them to look at the final path
(given by %P).
* jc/ll-merge-expose-path:
ll-merge: pass the original path to external drivers
Diffstat (limited to 't/t6026-merge-attr.sh')
-rwxr-xr-x | t/t6026-merge-attr.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh index 3c21938a6..04c0509c4 100755 --- a/t/t6026-merge-attr.sh +++ b/t/t6026-merge-attr.sh @@ -85,11 +85,12 @@ test_expect_success 'retry the merge with longer context' ' cat >./custom-merge <<\EOF #!/bin/sh -orig="$1" ours="$2" theirs="$3" exit="$4" +orig="$1" ours="$2" theirs="$3" exit="$4" path=$5 ( echo "orig is $orig" echo "ours is $ours" echo "theirs is $theirs" + echo "path is $path" echo "=== orig ===" cat "$orig" echo "=== ours ===" @@ -110,7 +111,7 @@ test_expect_success 'custom merge backend' ' git reset --hard anchor && git config --replace-all \ - merge.custom.driver "./custom-merge %O %A %B 0" && + merge.custom.driver "./custom-merge %O %A %B 0 %P" && git config --replace-all \ merge.custom.name "custom merge driver for testing" && @@ -121,7 +122,7 @@ test_expect_success 'custom merge backend' ' o=$(git unpack-file master^:text) && a=$(git unpack-file side^:text) && b=$(git unpack-file master:text) && - sh -c "./custom-merge $o $a $b 0" && + sh -c "./custom-merge $o $a $b 0 'text'" && sed -e 1,3d $a >check-2 && cmp check-1 check-2 && rm -f $o $a $b @@ -131,7 +132,7 @@ test_expect_success 'custom merge backend' ' git reset --hard anchor && git config --replace-all \ - merge.custom.driver "./custom-merge %O %A %B 1" && + merge.custom.driver "./custom-merge %O %A %B 1 %P" && git config --replace-all \ merge.custom.name "custom merge driver for testing" && @@ -148,9 +149,12 @@ test_expect_success 'custom merge backend' ' o=$(git unpack-file master^:text) && a=$(git unpack-file anchor:text) && b=$(git unpack-file master:text) && - sh -c "./custom-merge $o $a $b 0" && + sh -c "./custom-merge $o $a $b 0 'text'" && sed -e 1,3d $a >check-2 && cmp check-1 check-2 && + sed -e 1,3d -e 4q $a >check-3 && + echo "path is text" >expect && + cmp expect check-3 && rm -f $o $a $b ' |