[PATCH 1/2] merge-file fails to output anything for a degenerate merge

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Charles Bailey
Date: Sunday, May 24, 2009 - 5:21 pm

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>
---
 t/t6023-merge-file.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index f8942bc..44141af 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -54,6 +54,11 @@ deduxit me super semitas jusitiae,
 EOF
 printf "propter nomen suum." >> new4.txt
 
+cp orig.txt test.txt
+test_expect_success "merge with no changes" \
+	"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"
-- 
1.6.3.1.72.gbd1ec

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Slightly obscure merge-file inconsistency, Charles Bailey, (Sun May 24, 5:21 pm)
[PATCH 1/2] merge-file fails to output anything for a dege ..., Charles Bailey, (Sun May 24, 5:21 pm)
Re: [PATCH 2/2] Change xdl_merge to generate output even f ..., Johannes Schindelin, (Mon May 25, 12:51 am)
Re: [PATCH 1/2] merge-file fails to output anything for a ..., Johannes Schindelin, (Mon May 25, 12:52 am)