Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-18 00:03:08 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-18 00:03:08 +0300
commitf17d232f14135c9cce6e043389a9b7c434443606 (patch)
tree07e749813a2394cf76f4d0a78da41228515c1773 /t
parent2d019f46b00530c6c97413a840a4f0bb14b45877 (diff)
parentf297424a3a02b552865798ac8367cf657ef1df2d (diff)
Merge branch 'en/dir-api-cleanup'
Code clean-up to clarify directory traversal API. * en/dir-api-cleanup: unpack-trees: add usage notices around df_conflict_entry unpack-trees: special case read-tree debugging as internal usage unpack-trees: rewrap a few overlong lines from previous patch unpack-trees: mark fields only used internally as internal unpack_trees: start splitting internal fields from public API sparse-checkout: avoid using internal API of unpack-trees, take 2 sparse-checkout: avoid using internal API of unpack-trees unpack-trees: clean up some flow control dir: mark output only fields of dir_struct as such dir: add a usage note to exclude_per_dir dir: separate public from internal portion of dir_struct unpack-trees: heed requests to overwrite ignored files t2021: fix platform-specific leftover cruft
Diffstat (limited to 't')
-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..034f62c13c 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_dir some_dir
+'
+
test_done