Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-17 Thread Christian Couder
On Wed, Sep 17, 2014 at 9:58 AM, Jeff King wrote: > On Tue, Sep 16, 2014 at 10:01:11AM +0200, Christian Couder wrote: > >> On Mon, Sep 15, 2014 at 10:39 PM, Junio C Hamano wrote: >> > Christian Couder writes: >> > >> >> +/* Get the length of buf from its beginning until its last alphanumeric >>

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-17 Thread Jeff King
On Tue, Sep 16, 2014 at 10:01:11AM +0200, Christian Couder wrote: > On Mon, Sep 15, 2014 at 10:39 PM, Junio C Hamano wrote: > > Christian Couder writes: > > > >> +/* Get the length of buf from its beginning until its last alphanumeric > >> character */ > > > > That makes it sound as if feeding

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-16 Thread Christian Couder
On Mon, Sep 15, 2014 at 10:39 PM, Junio C Hamano wrote: > Christian Couder writes: > >> +/* Get the length of buf from its beginning until its last alphanumeric >> character */ > > That makes it sound as if feeding "abc%de#f@" to the function returns > 3 for "abc", but For me the last alphanume

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-15 Thread Junio C Hamano
Christian Couder writes: > +/* Get the length of buf from its beginning until its last alphanumeric > character */ That makes it sound as if feeding "abc%de#f@" to the function returns 3 for "abc", but > +static size_t alnum_len(const char *buf, size_t len) > +{ > + while (len > 0 && !isal

[PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-14 Thread Christian Couder
We will use a doubly linked list to store all information about trailers and their configuration. This way we can easily remove or add trailers to or from trailer lists while traversing the lists in either direction. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Makefile |