Re: [PATCH v2] archive: support filtering paths with glob

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

 



On Tue, Sep 23, 2014 at 2:15 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> When we have a/b/c and a/d/e to be written, the first round would
> write a/ and then a/b/ with the above, and presumably elsewhere
> somebody will write a/b/c; next time around we do need to write a/d/
> but we wouldn't want to write a/ itself.  How is this code
> preventing the recursion going all the way up every time to avoid
> repeating a/?
>
> Puzzled...

We never traverse 'a' (or any directory) twice and we only push a
directory to the stack when we examine it. After a/b and a are written
down and we examine 'd', 'a/d' is pushed to the stack. When we hit
'a/d/e', we only have 'a/d' in the stack, not 'a'.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]