merge-recursive: refuse to merge binary files
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6bfce93e04
commit
9f30855d0f
@ -81,4 +81,18 @@ EOF
|
||||
|
||||
test_expect_success "virtual trees were processed" "git diff expect out"
|
||||
|
||||
git reset --hard
|
||||
test_expect_success 'refuse to merge binary files' '
|
||||
printf "\0" > binary-file &&
|
||||
git add binary-file &&
|
||||
git commit -m binary &&
|
||||
git checkout G &&
|
||||
printf "\0\0" > binary-file &&
|
||||
git add binary-file &&
|
||||
git commit -m binary2 &&
|
||||
! git merge F > merge.out 2> merge.err &&
|
||||
grep "Cannot merge binary files: HEAD:binary-file vs. F:binary-file" \
|
||||
merge.err
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user