Re: [PATCH 06/12] revision.c: use commit-slab for show_source
- From
Jeff King <peff@peff.net>
- Date
- May 12, 2018, 09:33 UTC
- Message-ID
- <20180512093344.GG28279@sigill.intra.peff.net>
- In-Reply-To
- <20180512080028.29611-7-pclouds@gmail.com>
On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote:
Show 17 quoted lines
> 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" > > /* Remember to update object flag allocation in object.h */ > #define SEEN (1u<<0) > @@ -29,6 +30,7 @@ struct rev_info; > struct log_info; > struct string_list; > struct saved_parents; > +define_commit_slab(source_slab, char *);
Since this one is a global, can we give it a name that ties it to the revision machinery? Like "revision_source_slab" or something?
I wonder if we can even drop the "slab" to make the name shorter (e.g., "revision_sources" or something).
It's a little ugly that everybody who includes revision.h gets the full set of static functions defined. I wonder if we should have separate declare/define macros to let these exist as real functions. Maybe it doesn't really matter, though.
-Peff