Re: [PATCH v4 1/1] environment: move excludes_file into repo_config_values
From: Junio C Hamano <hidden>
Date: 2026-06-28 08:40:20
From: Junio C Hamano <hidden>
Date: 2026-06-28 08:40:20
Tian Yuchen [off-list ref] writes:
quoted
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 ;-).