From: Charles Bailey Date: Mon, 25 May 2009 00:21:13 +0000 (+0100) Subject: t6023: merge-file fails to output anything for a degenerate merge X-Git-Tag: v1.6.3.2~5^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1cd12926cedb340d176db607e087495381032ce2;p=git.git t6023: merge-file fails to output anything for a degenerate merge In the case that merge-file is passed three files with identical contents it wipes the contents of the output file instead of leaving it unchanged. Althought merge-file is porcelain and this will never happen in normal usage, it is still wrong. Signed-off-by: Charles Bailey Signed-off-by: Junio C Hamano --- diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh index f674c48ca..19556350b 100755 --- a/t/t6023-merge-file.sh +++ b/t/t6023-merge-file.sh @@ -54,6 +54,12 @@ deduxit me super semitas jusitiae, EOF printf "propter nomen suum." >> new4.txt +test_expect_failure 'merge with no changes' ' + cp orig.txt test.txt && + git merge-file test.txt orig.txt orig.txt && + test_cmp test.txt orig.txt +' + cp new1.txt test.txt test_expect_success "merge without conflict" \ "git merge-file test.txt orig.txt new2.txt"