Subject: Re: [PATCH v10] setup: improve error diagnosis for invalid .git files

From: Junio C Hamano <[email-masked]>
Date: Sun, 22 Feb 2026 21:10:01 -0800

Tian Yuchen <[email-masked]> writes:

> I must admit I hadn't considered this edge case at all. Thank you for 
> pointing it out :]

It is easy to see, if you run the tests, though ;-)

> I will:
>   - squash your diff into my patch
>   - rename the error code to `READ_GITFILE_ERR_STAT_MISSING`

I think MISSING is more appropriate than STAT_MISSING.  Our stat(2)
call positively identified that the given path does not exist on the
filesystem.

>   - combine this with the commit message refinements and test cleanups 
> suggested by Karthik in the previous thread.

Yeah, cleaning after yourselves in the tests is a good idea.