Re: [PATCH v5 07/11] refs: move parsing of "core.logAllRefUpdates" back into ref stores
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jun 25, 2026, 06:35 UTC
- Message-ID
- <ajzMLEgOs7E9kiBK@pks.im>
- In-Reply-To
- <ajxEXMTBmii01dVP@denethor>
On Wed, Jun 24, 2026 at 04:22:07PM -0500, Justin Tobler wrote:
Show 20 quoted lines
> On 26/06/22 10:28AM, Patrick Steinhardt wrote:
> > diff --git a/setup.c b/setup.c
> > index 79125db565..0c6efb0560 100644
> > --- a/setup.c
> > +++ b/setup.c
> > @@ -2584,10 +2584,15 @@ static int create_default_files(struct repository *repo,
> > if (is_bare_repository())
> > repo_config_set(repo, "core.bare", "true");
> > else {
> > + const char *value;
> > +
> > repo_config_set(repo, "core.bare", "false");
> > +
> > /* allow template config file to override the default */
> > - if (repo_settings_get_log_all_ref_updates(repo) == LOG_REFS_UNSET)
> > + if (repo_config_get_string_tmp(repo, "core.logallrefupdates", &value) ||
> > + refs_parse_log_all_ref_updates_config(value) == LOG_REFS_UNSET)
>
> Huh, can `refs_parse_log_all_ref_updates_config()` even return
> LOG_REFS_UNSET?It can't, so the second statement is really redundant. All that we care about there is that the configuration isn't already set, which is already covered by the first statement.
Will adapt.
Patrick