Re: [PATCH v6 01/11] for-each-ref: extract helper functions out of grab_single_ref()

2015-06-08 Thread Karthik Nayak
On 06/08/2015 11:32 PM, Junio C Hamano wrote: Karthik Nayak writes: + * Given a refname, return 1 if the refname matches with one of the patterns You can "match refname with pattern". But "refname matches the pattern" without "with", I think. I am not a native, though. + * while the patt

Re: [PATCH v6 01/11] for-each-ref: extract helper functions out of grab_single_ref()

2015-06-08 Thread Junio C Hamano
Karthik Nayak writes: > + * Given a refname, return 1 if the refname matches with one of the patterns You can "match refname with pattern". But "refname matches the pattern" without "with", I think. I am not a native, though. > + * while the pattern is a pathname like 'refs/tags' or 'refs/hea

[PATCH v6 01/11] for-each-ref: extract helper functions out of grab_single_ref()

2015-06-06 Thread Karthik Nayak
Extract two helper functions out of grab_single_ref(). Firstly, new_refinfo() which is used to allocate memory for a new refinfo structure and copy the objectname, refname and flag to it. Secondly, match_name_as_path() which when given an array of patterns and the refname checks if the refname matc