Re: [PATCH] read-tree -m -u: avoid getting confused by intermediate symlinks.
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 11, 2007, 17:10 UTC
- Message-ID
- <7vwszfb80y.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <81b0412b0705110708y7e3a9024p9e117e2da84ae916@mail.gmail.com>
"Alex Riesen" <raa.lkml@gmail.com> writes:
Show 10 quoted lines
> On 5/11/07, Junio C Hamano <junkio@cox.net> wrote:
>> @@ -268,6 +268,8 @@ static void unlink_entry(char *name)
>> {
>> char *cp, *prev;
>>
>> + if (has_symlink_leading_path(name))
>> + return;
>
> This can slow down the unlink case quiet considerably.
> Maybe the symlink paths can be cached?Yes it can, and probably doable.
This is called once per each path that disappears from the result, relative to the current tree. The number of calls to this function is potentially quite large.