From: Junio C Hamano Date: Sun, 28 Jun 2026 08:40:16 GMT Subject: Re: [PATCH v4 1/1] environment: move excludes_file into repo_config_values Message-ID: In-Reply-To: Tian Yuchen writes: >> 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 ;-).