dir-iterator: pass name to `prepare_next_entry_data()` directly
commit0218de2bdbd13975c31c3944775d0d7a6cd73e7b
authorPatrick Steinhardt <ps@pks.im>
Wed, 21 Feb 2024 12:37:19 +0000 (21 13:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Feb 2024 17:58:05 +0000 (21 09:58 -0800)
treef59db946484f6176fcd73e1bdc66458a09da687c
parentf7cdeafdd018ba143e0b2d7ef826b65ead923eac
dir-iterator: pass name to `prepare_next_entry_data()` directly

When adding the next directory entry for `struct dir_iterator` we pass
the complete `struct dirent *` to `prepare_next_entry_data()` even
though we only need the entry's name.

Refactor the code to pass in the name, only. This prepares for a
subsequent commit where we introduce the ability to iterate through
dir entries in an ordered manner.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir-iterator.c