Re: [PATCH v4 1/1] environment: move excludes_file into repo_config_values
Tian Yuchen <cat@malon.dev> writes:
Show 14 quoted lines
>> Wouldn't we rather want to try to be more strict and say
>>
>> if (!repo || !repo->initialized)
>> BUG("repo must be an initialied repository");
>>
>> here? Aren't all the callers of this function supposed to be
>> dealing with an already initialized repository?
>
> That makes sense, but from my point of view...
>
> 'repo_config_values()' already has a check for 'repo->initialized'. If
> we're absolutely certain that the 'repo' is initialized, wouldn't it be
> better to simply remove all the checks inside the getter and leave the
> judgment to 'repo_config_values()'?Yes, that was what I was getting at ;-).