From: Clemens Buchacher Date: Sat, 14 Apr 2012 23:15:17 +0000 (+0200) Subject: merge overwrites unstaged changes in renamed file X-Git-Url: https://git.tokkee.org/?p=git.git;a=commitdiff_plain;h=30fd3a54256a54e5a6006a203c923e97641fb2c2 merge overwrites unstaged changes in renamed file Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh index aa74184c3..6547eb8f5 100755 --- a/t/t7607-merge-overwrite.sh +++ b/t/t7607-merge-overwrite.sh @@ -92,6 +92,15 @@ test_expect_success 'will not overwrite removed file with staged changes' ' test_cmp important c1.c ' +test_expect_failure 'will not overwrite unstaged changes in renamed file' ' + git reset --hard c1 && + git mv c1.c other.c && + git commit -m rename && + cp important other.c && + git merge c1a && + test_cmp important other.c +' + test_expect_success 'will not overwrite untracked subtree' ' git reset --hard c0 && rm -rf sub &&