From: Kristoffer Haugsbakk Date: Tue, 16 Jan 2024 21:46:33 GMT Subject: Re: [PATCH v2 3/4] config: factor out global config file retrieval Message-ID: In-Reply-To: On Tue, Jan 16, 2024, at 22:39, Junio C Hamano wrote: > Kristoffer Haugsbakk writes: >> char *git_system_config(void); >> +/** >> + * Returns `NULL` if is uncertain whether or not `HOME/.gitconfig` exists. >> + */ > > Sorry, but I am not sure what this comment wants to say. > > When $HOME is not set, we do get NULL out of this function. But > interpolate_path() that makes git_global_config_paths() to return > NULL in user_config does not do any existence check with stat() or > access(), so even when we return a string that is "~/.gitconfig" > expanded to '/home/user/.gitconfig", we are not certain if the file > exists. So,... it is unclear what "uncertain"ty we are talking > about in this case. I'll delete it. It was an attempt to refer to the comments about "It is unknown if HOME/.gitconfig exists". Cheers -- Kristoffer Haugsbakk