Browse Source

merge overwrites unstaged changes in renamed file

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Clemens Buchacher 13 years ago committed by Junio C Hamano
parent
commit
30fd3a5425
  1. 9
      t/t7607-merge-overwrite.sh

9
t/t7607-merge-overwrite.sh

@ -92,6 +92,15 @@ test_expect_success 'will not overwrite removed file with staged changes' ' @@ -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 &&

Loading…
Cancel
Save