Re: [PATCH v3 1/9] bugreport: add tool to generate debugging info
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 19, 2019, 23:24 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1911200018470.15956@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20191119202542.GB36377@google.com>
Hi,
On Tue, 19 Nov 2019, Emily Shaffer wrote:
Show 21 quoted lines
> On Sat, Nov 16, 2019 at 12:11:38PM +0900, Junio C Hamano wrote: > > Emily Shaffer <emilyshaffer@google.com> writes: > > > > > Teach Git how to prompt the user for a good bug report: reproduction > > > steps, expected behavior, and actual behavior. Later, Git can learn how > > > to collect some diagnostic information from the repository. > > > > It makes sense, but I do not think of any good reason why this > > should be implemented as a builtin. I'd expect it would probably > > need to collect more info on the running environment than otherwise > > necessary for the regular Git operation, and perhaps you'd want to > > even link with libraries that are not needed for the regular Git > > operation to achieve that. > > > > Can you make it a standalone binary instead to avoid bloat of the > > main "git" binary? > > Sure. This would fix some other issues (needing to link against curl to > get the curl version, which is exactly what you implied). I wasn't > certain which circumstances a standalone binary was preferred, but I > agree with your reasoning here for sure.
FWIW I disagree with the idea that a tiny built-in command like `bugreport` would "bloat" the main `git` binary.
In contrast, I think that stand-alone commands _do_ bloat. Look here:
$ ls -lh git-daemon.exe git-credential-store.exe -rwxr-xr-x 1 me 4096 1.8M Nov 6 13:43 git-credential-store.exe* -rwxr-xr-x 1 me 4096 1.8M Nov 6 13:43 git-daemon.exe*
In other words, even a super simple stand-alone like `credential-store` (the `credential-store.c` file has only 198 lines!) weighs in with almost two megabytes.
So I fear that the claim that a stand-alone command would add less bloat than a built-in one, especially for a relatively small thing like `bugreport` has it exactly backwards.
Ciao, Dscho