Re: [RFC PATCH 4/6] dir-iterator: iterate dirs before or after their contents
- From
- Plato Kiorpelidis <kioplato@gmail.com>
- Date
- Apr 27, 2022, 14:57 UTC
- Message-ID
- <20220427145711.uwoa6n7kgq4okgr7@compass>
- In-Reply-To
- <b75aaee8-c037-e8e0-6ee0-729922059352@gmail.com>
On 22/04/11 02:31PM, Phillip Wood wrote:
Show 15 quoted lines
> Hi Plato > > On 10/04/2022 12:18, Plato Kiorpelidis wrote: > > Introduce a new feature to dir-iterator, using dir_iterator_begin() > > flags parameter, allowing to control whether or not directories will > > appear before or after their contents. > > > > The new default behavior (i.e. flags set to 0) does not iterate over > > directories. > > This is introducing two changes at once adding the "AFTER" flag and changing > the default behavior. I think it would make sence to separate those into two > separate commits. You could change the default adding the "BEFORE" flag and > adjusting the existing callers first and then implement the "AFTER" flag in > a second commit.
Nice, I'll split this commit into two, like you suggest.
> It would also be nice to see the "AFTER" flag being used by changing > remove_dir_recursively() for example.
I'll make use of "AFTER" flag to convert remove_subtree() function in entry.c and include the conversion in v2.
Tackling remove_dir_recursively() will come later.
Thanks Phillip, Plato
Show 5 quoted lines
> Best Wishes > > Phillip > > > [...]