Re: [PATCH v9 00/37] propose config-based hooks
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 27, 2021, 11:49 UTC
- Message-ID
- <87zgwgl7hd.fsf@evledraar.gmail.com>
- In-Reply-To
- <20210527000856.695702-1-emilyshaffer@google.com>
On Wed, May 26 2021, Emily Shaffer wrote:
> After much delay and $DAYJOB, here is v9.
Thanks. Haven't done any deep review of this yet. Just skimming things from v8 & commenting as I go along...
Show 6 quoted lines
> - Addressed nits in reviews on v8 > [... > Ævar's updated system_or_die() function > - changed strbuf to char* in hooks_list > - Attempted to do so in run_command's stdout callback, but this made > length protection difficult, so stuck with strbuf there.
I see there's still quite a bit of that strbuf churn still in this series, e.g. unfixed issues noted in https://lore.kernel.org/git/87pn04g0r1.fsf@evledraar.gmail.com/ e.g. in 07/37 you're still doing this: + struct strbuf hookname = STRBUF_INIT; + [...] + strbuf_addstr(&hookname, argv[0]); + opt.run_hookdir = should_run_hookdir; + + rc = run_hooks(hookname.buf, &opt); + + strbuf_release(&hookname);
So fair enough n the run_command's stdout callback, but it seems there's still quite a bit of strbuf encapsulating for no apparent benefit.