]> git.ipfire.org Git - thirdparty/git.git/commit
dir-iterator: drop unused `DIR_ITERATOR_FOLLOW_SYMLINKS`
authorTaylor Blau <me@ttaylorr.com>
Thu, 16 Feb 2023 18:27:14 +0000 (13:27 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Feb 2023 00:21:56 +0000 (16:21 -0800)
commite00e56a7df616659c90d107c3d31d362b5dff103
tree7631e8a47c5799297c3d4e4de8904ef0a8ff3fe8
parentd9d677b2d8cc5f70499db04e633ba7a400f64cbf
dir-iterator: drop unused `DIR_ITERATOR_FOLLOW_SYMLINKS`

The `FOLLOW_SYMLINKS` flag was added to the dir-iterator API in
fa1da7d2ee (dir-iterator: add flags parameter to dir_iterator_begin,
2019-07-10) in order to follow symbolic links while traversing through a
directory.

`FOLLOW_SYMLINKS` gained its first caller in ff7ccc8c9a (clone: use
dir-iterator to avoid explicit dir traversal, 2019-07-10), but it was
subsequently removed in 6f054f9fb3 (builtin/clone.c: disallow `--local`
clones with symlinks, 2022-07-28).

Since then, we've held on to the code for `DIR_ITERATOR_FOLLOW_SYMLINKS`
in the name of making minimally invasive changes during a security
embargo.

In fact, we even changed the dir-iterator API in bffc762f87
(dir-iterator: prevent top-level symlinks without FOLLOW_SYMLINKS,
2023-01-24) without having any non-test callers of that flag.

Now that we're past those security embargo(s), let's finalize our
cleanup of the `DIR_ITERATOR_FOLLOW_SYMLINKS` code and remove its
implementation since there are no remaining callers.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir-iterator.c
dir-iterator.h
t/helper/test-dir-iterator.c
t/t0066-dir-iterator.sh