Re: [PATCH v3 4/9] bugreport: add config values from whitelist
- From
Emily Shaffer <emilyshaffer@google.com>
- Date
- Nov 14, 2019, 21:55 UTC
- Message-ID
- <20191114215548.GC38770@google.com>
- In-Reply-To
- <xmqqwocn3tfa.fsf@gitster-ct.c.googlers.com>
On Wed, Oct 30, 2019 at 10:37:13AM +0900, Junio C Hamano wrote:
Show 22 quoted lines
> Josh Steadmon <steadmon@google.com> writes: > > > This and git_config_bugreport() below should both be static as well. > > Rather than repeating advice on the later patches, I'll just note that > > any new functions that don't show up in the corresponding .h file should > > be marked static. > > Good advice. > > More importantly, given that "git bugreport" itself has no service > of itself to offer other existing parts of Git (it is just a "gather > various pieces of information from different places, and then > produce a text file output" application), I do not see much point in > it having its own header file that others would #include (i.e. the > include file is to define services that are offered by it). If > there are common enough service routines invented to support the > need of bugreport.c (e.g. perhaps it wants to give more info than > what is currently available via the existing API on the contents of > in-core index), by definition of being them common enough, they > should be added to the header that can be used by both bugreport.c > and other existing users of the same subsystem (e.g. if it is about > in-core index, perhaps cache.h).
Are you asking me to have only builtin/bugreport.c and implement each function there, and eliminate both <basedir>/bugreport.[ch]?
It may be true that deciding to put this functionality into a library "in case someone needs it later" was premature, so I can do that - I just want to make sure I understand you.
- Emily