From: Junio C Hamano Date: Thu, 10 Sep 2020 22:21:47 GMT Subject: Re: [PATCH v4 8/9] commit: use config-based hooks Message-ID: In-Reply-To: Phillip Wood writes: >> + const char *arg; >> + struct strvec hook_args = STRVEC_INIT; >> + struct strbuf hook_name = STRBUF_INIT; >> int ret; >> + strbuf_addstr(&hook_name, name); > > Seeing this makes me wonder if it would be better for run_hooks() to > take a string for the name rather than an strbuf, I suspect that > virtually all callers have a fixed hook name. Yeah, that is a good point. It is always a good discipline to keep the type of the parameters callers need to pass to the minimum.