Re: [PATCH v10] setup: improve error diagnosis for invalid .git files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 23, 2026, 05:10 UTC
- Message-ID
- <xmqqfr6soxjq.fsf@gitster.g>
- In-Reply-To
- <5263825f-163c-43af-bac7-152d670919d9@gmail.com>
Tian Yuchen <a3205153416@gmail.com> 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.