From fadf488f9b8c4fc709f0b083d2769ecc1e0e1119 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 5 Jun 2007 03:36:49 +0100 Subject: merge-recursive: refuse to merge binary files [jc: cherry-picked 9f30855 from 'master'] Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t6024-recursive-merge.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 't') diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh index a398556137..058db9cc52 100755 --- a/t/t6024-recursive-merge.sh +++ b/t/t6024-recursive-merge.sh @@ -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 -- cgit v1.2.1