summaryrefslogtreecommitdiff
path: root/t/t7607-merge-overwrite.sh
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2012-04-15 01:15:17 +0200
committerJunio C Hamano <gitster@pobox.com>2012-04-15 22:44:39 -0700
commit30fd3a54256a54e5a6006a203c923e97641fb2c2 (patch)
treeb294e986c72d687d1d326bc2658e6e938f251434 /t/t7607-merge-overwrite.sh
parent36e6c803a1ef68b8acdc4138597db4fb087112be (diff)
downloadgit-30fd3a54256a54e5a6006a203c923e97641fb2c2.tar.gz
merge overwrites unstaged changes in renamed file
Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7607-merge-overwrite.sh')
-rwxr-xr-xt/t7607-merge-overwrite.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index aa74184c31..6547eb8f54 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 &&