Re: [PATCH] [GSOC] prune_worktrees(): reimplement with dir_iterator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Stanca <robert.stanca7@xxxxxxxxx> writes:

> Replaces recursive traversing of opendir with dir_iterator

The original code for this one, and also the other one, is not
recursive traversing.  This one enumerates all the _direct_
subdirectories of ".git/worktrees", and feeds them to
prune_worktree() without recursing.  The other one scans all the
files _directly_ underneath ".git/objects/pack" to find the ones
that begin with the packtmp prefix, and unlinks them without
recursing.  Neither of them touches anything in subdirectory of
".git/worktrees/" nor ".git/objects/pack/".

Using dir_iterator() to make it recursive is not just overkill but
is a positively wrong change, isn't it?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]