Re: [PATCH v3 13/13] alloc: allow arbitrary repositories for alloc functions

2018-05-10 Thread Duy Nguyen
On Wed, May 9, 2018 at 9:20 PM, Stefan Beller wrote: > On Wed, May 9, 2018 at 10:18 AM, Duy Nguyen wrote: >> >> If you want to reproduce, this is what I used to test this with. >> >> https://gist.github.com/pclouds/86a2df6c28043f1b6fa3d4e72e7a1276 > > This

Re: [PATCH v3 13/13] alloc: allow arbitrary repositories for alloc functions

2018-05-09 Thread Stefan Beller
On Wed, May 9, 2018 at 10:18 AM, Duy Nguyen wrote: > > If you want to reproduce, this is what I used to test this with. > > https://gist.github.com/pclouds/86a2df6c28043f1b6fa3d4e72e7a1276 This only applied cleanly after I created an empty file at t/helper/test-abc.c, using

Re: [PATCH v3 13/13] alloc: allow arbitrary repositories for alloc functions

2018-05-09 Thread Duy Nguyen
On Tue, May 8, 2018 at 10:04 PM, Jonathan Tan wrote: > On Tue, 8 May 2018 12:37:36 -0700 > Stefan Beller wrote: > >> +void clear_alloc_state(struct alloc_state *s) >> +{ >> + while (s->slab_nr > 0) { >> + s->slab_nr--; >> +

Re: [PATCH v3 13/13] alloc: allow arbitrary repositories for alloc functions

2018-05-09 Thread Duy Nguyen
On Tue, May 8, 2018 at 10:37 PM, Stefan Beller wrote: >>> +void release_tree_node(struct tree *t); >>> +void release_commit_node(struct commit *c); >>> +void release_tag_node(struct tag *t); >> >> Do these really need to be defined in alloc.c? I would think that it >> would be

Re: [PATCH v3 13/13] alloc: allow arbitrary repositories for alloc functions

2018-05-08 Thread Stefan Beller
On Tue, May 8, 2018 at 1:04 PM, Jonathan Tan wrote: > On Tue, 8 May 2018 12:37:36 -0700 > Stefan Beller wrote: > >> +void clear_alloc_state(struct alloc_state *s) >> +{ >> + while (s->slab_nr > 0) { >> + s->slab_nr--; >> +

Re: [PATCH v3 13/13] alloc: allow arbitrary repositories for alloc functions

2018-05-08 Thread Jonathan Tan
On Tue, 8 May 2018 12:37:36 -0700 Stefan Beller wrote: > +void clear_alloc_state(struct alloc_state *s) > +{ > + while (s->slab_nr > 0) { > + s->slab_nr--; > + free(s->slabs[s->slab_nr]); > + } I should have caught this earlier, but you need