merge overwrites unstaged changes in renamed file

Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Clemens Buchacher committed Apr 15, 2012 at 01:15 UTC 30fd3a54256a54e5a6006a203c923e97641fb2c2
1 file changed +9
t/t7607-merge-overwrite.sh
+9
@@ -92,6 +92,15 @@ test_expect_success 'will not overwrite removed file with staged changes' '
92 test_cmp important c1.c
93 '
94
95 +test_expect_failure 'will not overwrite unstaged changes in renamed file' '
96 + git reset --hard c1 &&
97 + git mv c1.c other.c &&
98 + git commit -m rename &&
99 + cp important other.c &&
100 + git merge c1a &&
101 + test_cmp important other.c
102 +'
103 +
104 test_expect_success 'will not overwrite untracked subtree' '
105 git reset --hard c0 &&
106 rm -rf sub &&