Re: [PATCH v3 5/9] ref-filter: add option to match literal pattern

2015-07-22 Thread Matthieu Moy
Karthik Nayak writes: > --- a/ref-filter.c > +++ b/ref-filter.c > @@ -943,9 +943,23 @@ static int commit_contains(struct ref_filter *filter, > struct commit *commit) > > /* > * Return 1 if the refname matches one of the patterns, otherwise 0. > + * A pattern can be a literal prefix (e.g. a

Re: [PATCH v3 5/9] ref-filter: add option to match literal pattern

2015-07-21 Thread Karthik Nayak
On Mon, Jul 20, 2015 at 11:42 PM, Eric Sunshine wrote: > On Mon, Jul 20, 2015 at 4:01 AM, Christian Couder > wrote: >> On Mon, Jul 20, 2015 at 8:24 AM, Eric Sunshine >> wrote: >>> On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak >>> wrote: +static int filter_pattern_match(struct ref_filter

Re: [PATCH v3 5/9] ref-filter: add option to match literal pattern

2015-07-20 Thread Eric Sunshine
On Mon, Jul 20, 2015 at 4:01 AM, Christian Couder wrote: > On Mon, Jul 20, 2015 at 8:24 AM, Eric Sunshine > wrote: >> On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote: >>> +static int filter_pattern_match(struct ref_filter *filter, const char >>> *refname) >>> +{ >>> + if (!*filter->

Re: [PATCH v3 5/9] ref-filter: add option to match literal pattern

2015-07-20 Thread Christian Couder
On Mon, Jul 20, 2015 at 8:24 AM, Eric Sunshine wrote: > On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote: >> Since 'ref-filter' only has an option to match path names add an >> option for plain fnmatch pattern-matching. >> >> This is to support the pattern matching options which are used in `

Re: [PATCH v3 5/9] ref-filter: add option to match literal pattern

2015-07-19 Thread Eric Sunshine
On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak wrote: > Since 'ref-filter' only has an option to match path names add an > option for plain fnmatch pattern-matching. > > This is to support the pattern matching options which are used in `git > tag -l` and `git branch -l` where we can match patterns