summaryrefslogtreecommitdiffstats
path: root/t/t0066-dir-iterator.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-17 01:40:29 +0100
committerJunio C Hamano <gitster@pobox.com>2023-02-17 02:55:42 +0100
commit3b0ebb7a8db6e5a1a11dcb2c1f549e4d6037185c (patch)
treee023213920c62e04b4b4f43f075af33e8fb11c61 /t/t0066-dir-iterator.sh
parentdir-iterator: drop unused `DIR_ITERATOR_FOLLOW_SYMLINKS` (diff)
downloadgit-3b0ebb7a8db6e5a1a11dcb2c1f549e4d6037185c.tar.xz
git-3b0ebb7a8db6e5a1a11dcb2c1f549e4d6037185c.zip
t0066: drop setup of "dir5"
The symlink setup in t0066 makes several directories with links, dir4 through dir6. But ever since dir5 was introduced in fa1da7d2ee (dir-iterator: add flags parameter to dir_iterator_begin, 2019-07-10), it has never actually been used. It was left over from an earlier iteration of the patch which tried to handle recursive symlinks specially, as seen in: https://lore.kernel.org/git/20190502144829.4394-7-matheus.bernardino@usp.br/ It's not hurting any of the existing tests to be there, but the extra setup is confusing to anybody trying to read and understand the tests. Let's drop the extra directory, and we'll rename "dir6" to "dir5" so nobody wonders whether the gap in naming is important. Helped-by: Matheus Tavares Bernardino <matheus.tavb@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0066-dir-iterator.sh')
-rwxr-xr-xt/t0066-dir-iterator.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/t/t0066-dir-iterator.sh b/t/t0066-dir-iterator.sh
index 4ed3136b00..7d0a0da8c0 100755
--- a/t/t0066-dir-iterator.sh
+++ b/t/t0066-dir-iterator.sh
@@ -106,13 +106,7 @@ test_expect_success SYMLINKS 'setup dirs with symlinks' '
ln -s d dir4/a/e &&
ln -s ../b dir4/a/f &&
- mkdir -p dir5/a/b &&
- mkdir -p dir5/a/c &&
- ln -s ../c dir5/a/b/d &&
- ln -s ../ dir5/a/b/e &&
- ln -s ../../ dir5/a/b/f &&
-
- ln -s dir4 dir6
+ ln -s dir4 dir5
'
test_expect_success SYMLINKS 'dir-iterator should not follow symlinks by default' '
@@ -132,7 +126,7 @@ test_expect_success SYMLINKS 'dir-iterator should not follow symlinks by default
'
test_expect_success SYMLINKS 'dir-iterator does not resolve top-level symlinks' '
- test_must_fail test-tool dir-iterator ./dir6 >out &&
+ test_must_fail test-tool dir-iterator ./dir5 >out &&
grep "ENOTDIR" out
'