summaryrefslogtreecommitdiff
path: root/t/t2021-checkout-overwrite.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2021-checkout-overwrite.sh')
-rwxr-xr-xt/t2021-checkout-overwrite.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.sh
index 713c3fa603..ecfacf0f7f 100755
--- a/t/t2021-checkout-overwrite.sh
+++ b/t/t2021-checkout-overwrite.sh
@@ -50,10 +50,13 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
test_expect_success SYMLINKS 'the symlink remained' '
- test_when_finished "rm a/b" &&
test -h a/b
'
+test_expect_success 'cleanup after previous symlink tests' '
+ rm a/b
+'
+
test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing entries' '
git checkout -f start &&
mkdir dir &&
@@ -66,4 +69,15 @@ test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing
test_path_is_file untracked/f
'
+test_expect_success 'checkout --overwrite-ignore should succeed if only ignored files in the way' '
+ git checkout -b df_conflict &&
+ test_commit contents some_dir &&
+ git checkout start &&
+ mkdir some_dir &&
+ echo autogenerated information >some_dir/ignore &&
+ echo ignore >.git/info/exclude &&
+ git checkout --overwrite-ignore df_conflict &&
+ test_path_is_file some_dir
+'
+
test_done