summaryrefslogtreecommitdiff
path: root/t/t6037-merge-ours-theirs.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-14 21:39:56 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-14 21:39:56 -0700
commite6d29a4b47cf476e18658609033bdee4c42db3b8 (patch)
tree408497238b9a9f254cfcc54c7b51480bf58b5356 /t/t6037-merge-ours-theirs.sh
parentMerge branch 'cn/branch-set-upstream-to' (diff)
parentll-merge: warn about inability to merge binary files only when we can't (diff)
downloadtgif-e6d29a4b47cf476e18658609033bdee4c42db3b8.tar.xz
Merge branch 'jc/ll-merge-binary-ours'
"git merge -Xtheirs" did not help content-level merge of binary files; it should just take their version. Also "*.jpg binary" in the attributes did not imply they should use the binary ll-merge driver. * jc/ll-merge-binary-ours: ll-merge: warn about inability to merge binary files only when we can't attr: "binary" attribute should choose built-in "binary" merge driver merge: teach -Xours/-Xtheirs to binary ll-merge driver
Diffstat (limited to 't/t6037-merge-ours-theirs.sh')
-rwxr-xr-xt/t6037-merge-ours-theirs.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/t6037-merge-ours-theirs.sh b/t/t6037-merge-ours-theirs.sh
index 2cf42c73f1..3889eca4ae 100755
--- a/t/t6037-merge-ours-theirs.sh
+++ b/t/t6037-merge-ours-theirs.sh
@@ -53,7 +53,19 @@ test_expect_success 'recursive favouring ours' '
! grep 1 file
'
-test_expect_success 'pull with -X' '
+test_expect_success 'binary file with -Xours/-Xtheirs' '
+ echo file binary >.gitattributes &&
+
+ git reset --hard master &&
+ git merge -s recursive -X theirs side &&
+ git diff --exit-code side HEAD -- file &&
+
+ git reset --hard master &&
+ git merge -s recursive -X ours side &&
+ git diff --exit-code master HEAD -- file
+'
+
+test_expect_success 'pull passes -X to underlying merge' '
git reset --hard master && git pull -s recursive -Xours . side &&
git reset --hard master && git pull -s recursive -X ours . side &&
git reset --hard master && git pull -s recursive -Xtheirs . side &&