Subject: Re: [PATCH v2] Make 'trust_executable_bit' repository-scoped

From: [email-masked]
Date: Mon, 09 Mar 2026 15:13:34 +0800

> Hi drona,
> 
> Thanks for the update! Just a quick heads-up: it looks like
> you forgot to CC Junio ([email-masked]) on this iteration.
> Additionally, I think it's a good practice to respond to
> reviews before sending new patches. What do you think?
> 
>>  	if (!strcmp(var, "core.filemode")) {
>> +		prepare_repo_settings(the_repository);
>>  		the_repository->settings.trust_executable_bit = 
>> git_config_bool(var, value);
>>  		return 0;
>>  	}
> 
> Regarding the code, calling 'prepare_repo_settings()' inside
> 'git_default_core_config()' defeats the purpose of lazy-loading,
> doesn't it?
> 
> if (!strcmp(var, "core.filemode")) {
> 	prepare_repo_settings(the_repository);
> 	the_repository->settings.trust_executable_bit = git_config_bool(var, 
> value);
> 	return 0;
> }
> 
> I think the standard practice is to drop the variable from
> 'environment.c' completely and read it directly inside
> 'repo-settings.c: prepare_repo_settings()' using
> 'repo_config_get_bool()'.
> 
> Regards,
> 
> Yuchen

I accidentally clicked the wrong option and didn't select Reply All.

I'll CC Junio on this message.

Regards,

Yuchen