Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On 06/08/2015 10:51 PM, Matthieu Moy wrote: We could introduce ref-filter.h earlier, indeed. To me, the current solution is good enough, but introducing ref-filter.h early and adding function definition there in the same commit as you drop the

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Karthik Nayak
On 06/08/2015 10:51 PM, Matthieu Moy wrote: Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Karthik Nayak karthik@gmail.com writes: On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +/* Free all memory

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Karthik Nayak karthik@gmail.com writes: On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +/* Free all memory allocated for ref_array */ +void ref_array_clear(struct ref_array *array) Is this a

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Karthik Nayak karthik@gmail.com writes: On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +/* Free all memory allocated for ref_array */ +void

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: +/* Free all memory allocated for ref_array */ +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not, you probably want to export it in a .h file. -- Matthieu Moy http://www-verimag.imag.fr/~moy/

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Karthik Nayak
On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +/* Free all memory allocated for ref_array */ +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not, you probably want to export it in a .h file. It

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Karthik Nayak
On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +/* Free all memory allocated for ref_array */ +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not, you probably want to export it in a .h file. It

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +/* Free all memory allocated for ref_array */ +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not,

[WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-06 Thread Karthik Nayak
Introduce and implement 'ref_array_clear()' which will free all allocated memory for 'ref_array'. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com --- builtin/for-each-ref.c | 21