Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-29 Thread Karthik Nayak
On Wed, Jul 29, 2015 at 3:38 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Christian Couder christian.cou...@gmail.com writes: On Tue, Jul 28, 2015 at 8:56

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-29 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Christian Couder christian.cou...@gmail.com writes: On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: +static void

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Christian Couder
On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: diff --git a/ref-filter.h b/ref-filter.h index 7d1871d..3458595 100644 --- a/ref-filter.h +++ b/ref-filter.h @@ -5,6 +5,7 @@ #include refs.h #include commit.h #include parse-options.h +#include revision.h /*

[RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Karthik Nayak
Make 'branch.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'branch.c' to use 'ref-filter' APIs. This is a temporary step before porting 'branch.c' to use 'ref-filter' completely. As this is a temporary step, most

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Christian Couder
On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: +static void ref_array_append(struct ref_array *array, const char *refname) +{ + size_t len = strlen(refname); + struct ref_array_item *ref = xcalloc(1, sizeof(struct ref_array_item) + len + 1); +

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Matthieu Moy
Christian Couder christian.cou...@gmail.com writes: On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: +static void ref_array_append(struct ref_array *array, const char *refname) +{ + size_t len = strlen(refname); + struct ref_array_item *ref =

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 1:52 PM, Christian Couder christian.cou...@gmail.com wrote: On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: diff --git a/ref-filter.h b/ref-filter.h index 7d1871d..3458595 100644 --- a/ref-filter.h +++ b/ref-filter.h @@ -5,6 +5,7 @@

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 1:47 PM, Christian Couder christian.cou...@gmail.com wrote: On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: +static void ref_array_append(struct ref_array *array, const char *refname) +{ + size_t len = strlen(refname); + struct

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Christian Couder christian.cou...@gmail.com writes: On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak karthik@gmail.com wrote: +static void ref_array_append(struct ref_array *array, const char *refname) +{ +