From 30fd3a54256a54e5a6006a203c923e97641fb2c2 Mon Sep 17 00:00:00 2001 From: Clemens Buchacher Date: Sun, 15 Apr 2012 01:15:17 +0200 Subject: [PATCH] merge overwrites unstaged changes in renamed file Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- t/t7607-merge-overwrite.sh | 9 +++++++++ 1 file changed, 9 insertions(+) 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 && -- 2.30.2