Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

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

From: Tom Grennan <hidden>
Date: 2016-06-15 22:53:03

On Sat, Feb 11, 2012 at 03:43:34PM -0800, Junio C Hamano wrote:
Tom Grennan [off-list ref] writes:
quoted
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.
Hmm, I'm not communicating very well; this is exactly what I meant by,
quoted
Of course I'd add a with_exclusions_first() before the
respective ref iterator.
-- 
TomG
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help