Re: [PATCH v9 00/37] propose config-based hooks
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-05-27 11:52:06
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...
- 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/ (local) 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.