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 wrote: > Karthik Nayak writes: > >> On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy >> wrote: >>> Christian Couder writes: >>> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak wrote: > +static void ref_array_append(struct ref_array

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

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy > wrote: >> Christian Couder writes: >> >>> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak >>> wrote: >>> +static void ref_array_append(struct ref_array *array, const char *refname) +{ + size_t len = st

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 wrote: > Christian Couder writes: > >> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak wrote: >> >>> +static void ref_array_append(struct ref_array *array, const char *refname) >>> +{ >>> + size_t len = strlen(refname); >>> + struct ref_ar

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 wrote: > On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak 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, sizeo

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 wrote: > On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak 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

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

2015-07-28 Thread Matthieu Moy
Christian Couder writes: > On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak 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) +

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 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" > > /* Qu

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 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); > + memcpy(ref->ref

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

2015-07-27 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 o