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

From: Tian Yuchen <[email-masked]>
Date: Thu, 5 Mar 2026 01:35:11 +0800

Hi Junio,

> That is one of the things.  The broken test highlighted that
> GIT_DIR_EXPLICIT case needs more thought than what we have discussed
> so far, but there may be other cases that we need to also think
> about.  See what different cases are in the big switch statement in
> setup_git_directory_gently().

Shortly before your email I had already sent the v12 patch.

I did make changes in setup_git_directory_gently_1(), and logically it 
shouldn't cause major issues.

Unfortunately, looking back now, my implementation barely qualifies as 
“functional” and actually undermines the purpose of setup_git..() 
itself. It's a mess — I rushed into it without properly reviewing the 
context (like how other cases are handled) :(((

I'll polish it thoroughly before releasing v13.

Regards,

Yuchen