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
This commit is contained in:
Junio C Hamano
2012-09-14 21:39:56 -07:00
5 changed files with 41 additions and 12 deletions

View File

@ -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 &&