Skip to content

Commit

Permalink
merge overwrites unstaged changes in renamed file
Browse files Browse the repository at this point in the history
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Clemens Buchacher authored and Junio C Hamano committed Apr 16, 2012
1 parent 36e6c80 commit 30fd3a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions t/t7607-merge-overwrite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 30fd3a5

Please sign in to comment.