diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-14 21:39:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-14 21:39:56 -0700 |
commit | e6d29a4b47cf476e18658609033bdee4c42db3b8 (patch) | |
tree | 408497238b9a9f254cfcc54c7b51480bf58b5356 /t/t6037-merge-ours-theirs.sh | |
parent | Merge branch 'cn/branch-set-upstream-to' (diff) | |
parent | ll-merge: warn about inability to merge binary files only when we can't (diff) | |
download | tgif-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-x | t/t6037-merge-ours-theirs.sh | 14 |
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 && |