Skip to content

Commit 3b0ebb7

Browse files
peffgitster
authored andcommitted
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 fa1da7d (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/[email protected]/ 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 <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e00e56a commit 3b0ebb7

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

t/t0066-dir-iterator.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,7 @@ test_expect_success SYMLINKS 'setup dirs with symlinks' '
106106
ln -s d dir4/a/e &&
107107
ln -s ../b dir4/a/f &&
108108
109-
mkdir -p dir5/a/b &&
110-
mkdir -p dir5/a/c &&
111-
ln -s ../c dir5/a/b/d &&
112-
ln -s ../ dir5/a/b/e &&
113-
ln -s ../../ dir5/a/b/f &&
114-
115-
ln -s dir4 dir6
109+
ln -s dir4 dir5
116110
'
117111

118112
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
132126
'
133127

134128
test_expect_success SYMLINKS 'dir-iterator does not resolve top-level symlinks' '
135-
test_must_fail test-tool dir-iterator ./dir6 >out &&
129+
test_must_fail test-tool dir-iterator ./dir5 >out &&
136130
137131
grep "ENOTDIR" out
138132
'

0 commit comments

Comments
 (0)