Re: [PATCHv2 1/4] refs: add common refname_match_patterns()

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

 



Tom Grennan <tmgrennan@xxxxxxxxx> writes:

> Yes, I should have stated that this emphasized containment over
> efficiency.  If instead we stipulate that the caller must list exclusion
> patterns before others, this could simply be:

No.

You have to pre-parse and rearrange the pattern[] list *only once* before
matching them against dozens of refs, so instead of forcing the callers do
anything funky, you give a function that gets a pattern[] list and returns
something that can be efficiently used by the match_pattern() function,
and have the caller pass that thing, not the original pattern[] list, to
the match_pattern() function.

That is how pathspec matching side of the logic is arranged.

I keep saying that it is probably not a good idea to directly reuse the
pathspec code, but you would want to study and learn from the overall
structure of it.

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