summaryrefslogtreecommitdiff
path: root/t/t7607-merge-overwrite.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7607-merge-overwrite.sh')
-rwxr-xr-xt/t7607-merge-overwrite.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index aa74184c31..758a623cdb 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 &&
@@ -132,11 +141,10 @@ test_expect_success SYMLINKS 'will not overwrite untracked symlink in leading pa
test_path_is_missing .git/MERGE_HEAD
'
-test_expect_success SYMLINKS 'will not be confused by symlink in leading path' '
+test_expect_success 'will not be confused by symlink in leading path' '
git reset --hard c0 &&
rm -rf sub &&
- ln -s sub2 sub &&
- git add sub &&
+ test_ln_s_add sub2 sub &&
git commit -m ln &&
git checkout sub
'