Re: [PATCH/WIP v3 1/4] for-each-ref: extract helper functions out of grab_single_ref()

2015-05-28 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: This is a preperatory patch for restructuring 'for-each-ref' and evntually moving most of it to 'ref-filter' to provide the s/evntually/eventually/ The patch looks much nicer now. - int cnt; [...] + REALLOC_ARRAY(cb-grab_array,

Re: [PATCH/WIP v3 1/4] for-each-ref: extract helper functions out of grab_single_ref()

2015-05-28 Thread Karthik Nayak
On 05/29/2015 01:43 AM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: This is a preperatory patch for restructuring 'for-each-ref' and evntually moving most of it to 'ref-filter' to provide the s/evntually/eventually/ Noted. The patch looks much nicer now. -

[PATCH/WIP v3 1/4] for-each-ref: extract helper functions out of grab_single_ref()

2015-05-28 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