Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Matthieu Moy
Christian Couder christian.cou...@gmail.com writes: sort_refs() - ref_array_sort() struct ref_sort - struct ref_sort_criteria default_sort() - ref_default_sort_criteria() opt_parse_sort() - opt_parse_ref_sort_criteria() BTW, having such summary in the log message would help review: we could

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: Could be achieved using a simple wrapper around 'filter_refs()' something like this perhaps. int filter_refs_with_pattern(struct ref_array *ref, int (*for_each_ref_fn)(each_ref_fn, void *), char **patterns) { int i; struct

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Karthik Nayak
On June 1, 2015 12:08:57 PM GMT+05:30, Matthieu Moy matthieu@grenoble-inp.fr wrote: Christian Couder christian.cou...@gmail.com writes: sort_refs() - ref_array_sort() struct ref_sort - struct ref_sort_criteria default_sort() - ref_default_sort_criteria() opt_parse_sort() -

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Karthik Nayak
On June 1, 2015 8:23:51 PM GMT+05:30, Junio C Hamano gits...@pobox.com wrote: Karthik Nayak karthik@gmail.com writes: Could be achieved using a simple wrapper around 'filter_refs()' something like this perhaps. int filter_refs_with_pattern(struct ref_array *ref, int

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: /* - * A call-back given to for_each_ref(). Filter refs and keep them for + * A call-back given to for_each_ref(). Filter refs and keep them for * later object processing. */ -static int grab_single_ref(const char *refname, const unsigned

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: On Sat, May 30, 2015 at 7:53 PM, Karthik Nayak karthik@gmail.com wrote: -static void sort_refs(struct ref_sort *sort, struct ref_array *array) +void sort_ref_array(struct ref_sort *sort, struct ref_array *array) It is probably better

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Karthik Nayak
On 05/31/2015 07:33 PM, Christian Couder wrote: On Sun, May 31, 2015 at 11:17 AM, Karthik Nayak karthik@gmail.com wrote: On 05/31/2015 01:41 PM, Christian Couder wrote: On Sun, May 31, 2015 at 10:04 AM, Christian Couder christian.cou...@gmail.com wrote: On Sat, May 30, 2015 at 7:53 PM,

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Karthik Nayak
On 05/31/2015 11:18 PM, Junio C Hamano wrote: Karthik Nayak karthik@gmail.com writes: /* - * A call-back given to for_each_ref(). Filter refs and keep them for + * A call-back given to for_each_ref(). Filter refs and keep them for * later object processing. */ -static int

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Christian Couder
On Sat, May 30, 2015 at 7:53 PM, Karthik Nayak karthik@gmail.com wrote: -static void sort_refs(struct ref_sort *sort, struct ref_array *array) +void sort_ref_array(struct ref_sort *sort, struct ref_array *array) It is probably better to call the above function ref_array_sort()... [...]

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Christian Couder
On Sun, May 31, 2015 at 10:04 AM, Christian Couder christian.cou...@gmail.com wrote: On Sat, May 30, 2015 at 7:53 PM, Karthik Nayak karthik@gmail.com wrote: -static void sort_refs(struct ref_sort *sort, struct ref_array *array) +void sort_ref_array(struct ref_sort *sort, struct ref_array

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Karthik Nayak
On 05/31/2015 08:51 AM, Eric Sunshine wrote: On Sat, May 30, 2015 at 1:53 PM, Karthik Nayak karthik@gmail.com wrote: Rename some of the functions and make them publically available. s/publically/publicly/ This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Karthik Nayak
On 05/31/2015 01:41 PM, Christian Couder wrote: On Sun, May 31, 2015 at 10:04 AM, Christian Couder christian.cou...@gmail.com wrote: On Sat, May 30, 2015 at 7:53 PM, Karthik Nayak karthik@gmail.com wrote: -static void sort_refs(struct ref_sort *sort, struct ref_array *array) +void

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-31 Thread Christian Couder
On Sun, May 31, 2015 at 11:17 AM, Karthik Nayak karthik@gmail.com wrote: On 05/31/2015 01:41 PM, Christian Couder wrote: On Sun, May 31, 2015 at 10:04 AM, Christian Couder christian.cou...@gmail.com wrote: On Sat, May 30, 2015 at 7:53 PM, Karthik Nayak karthik@gmail.com wrote:

[WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-30 Thread Karthik Nayak
Rename some of the functions and make them publically available. This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to make meaningful, targeted services available to other commands via public APIs. Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 1:53 PM, Karthik Nayak karthik@gmail.com wrote: Rename some of the functions and make them publically available. s/publically/publicly/ This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to make meaningful, targeted services available to