Thread (27 messages) 27 messages, 4 authors, 2d ago

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

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 ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help