summaryrefslogtreecommitdiff
path: root/t/t6023-merge-file.sh
diff options
context:
space:
mode:
authorCharles Bailey <charles@hashpling.org>2009-05-25 00:21:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-25 06:46:03 (GMT)
commit1cd12926cedb340d176db607e087495381032ce2 (patch)
tree26be56f1edc505f3a48b779a6b5572d8245d32ba /t/t6023-merge-file.sh
parent6589ebf107214a9e6db31764e847301f1adebc81 (diff)
downloadgit-1cd12926cedb340d176db607e087495381032ce2.zip
git-1cd12926cedb340d176db607e087495381032ce2.tar.gz
git-1cd12926cedb340d176db607e087495381032ce2.tar.bz2
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 <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6023-merge-file.sh')
-rwxr-xr-xt/t6023-merge-file.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index f674c48..1955635 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"