Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 04:13:59PM +0200, Duy Nguyen wrote: > > Should this one be global in the first place? Can we tie it to say > > "struct rev_info" or something? I'd somehow anticipate a far future > > where object flag bits used for traversal book-keeping would be moved > > out of the

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 3:58 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote: >> >>> diff --git a/revision.h b/revision.h >>> index b8c47b98e2..72404e2599 100644 >>> --- a/revision.h >>> +++

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Junio C Hamano
Jeff King writes: > On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote: > >> diff --git a/revision.h b/revision.h >> index b8c47b98e2..72404e2599 100644 >> --- a/revision.h >> +++ b/revision.h >> @@ -6,6 +6,7 @@ >> #include "notes.h" >> #include "pretty.h" >>

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote: > diff --git a/revision.h b/revision.h > index b8c47b98e2..72404e2599 100644 > --- a/revision.h > +++ b/revision.h > @@ -6,6 +6,7 @@ > #include "notes.h" > #include "pretty.h" > #include "diff.h" > +#include "commit-slab.h"

[PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Nguyễn Thái Ngọc Duy
Instead of relying on commit->util to store the source string, let the user provide a commit-slab to store the source strings in. It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy