Re: [PATCH 12/12] mingw: allow `git.exe` to be used instead of the "Git wrapper"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 12, 2026, 14:27 UTC
- Message-ID
- <xmqqcxvnza6c.fsf@gitster.g>
- In-Reply-To
- <bacfe6f4-706e-670c-3466-ccb4d7caeffb@gmx.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
>> Checking tmp[0] is a sign that we do not consider MSYSTEM set to an >> empty string a sane state and ENSURE_MSYSTEM_IS_SET is about >> correcting it, right? > > "sane state" is quite the strong wording for such a minor issue.
Well I didn't know how important that variable is, and didn't expect or wish to offend you by use of that word. Perhaps "sane"->"usual" would have been better? Sorry about uninformed choice of phrasing.
Show 7 quoted lines
>> Can $(MSYSTEM) be an empty string or undefined at the build time, >> making ENSURE_MSYSTEM_IS_SET set to "" (two double-quotes)? > > Sure it can. Just like `PATH` or `HOME` can be empty, or invalid. But the > person building the project has to go out of their way to make it so, > therefore I don't want to spend any more brain cells on that highly > unlikely scenario.
Again, I didn't know how unlikely it was, so I judged it based on the existing practice (quoted) below.
Show 17 quoted lines
> Ciao, > Johannes > >> Which would mean we are exporting MSYSTEM defined to be an empty string >> as well with this setenv. >> >> It seems ifeq($(uname_S),MINGW) side protects against this situation >> by placing the cflags definition >> >> + COMPAT_CFLAGS += -DDETECT_MSYS_TTY \ >> + -DENSURE_MSYSTEM_IS_SET="\"$(MSYSTEM)\"" \ >> >> inside "ifneq (,$(MSYSTEM))..endif". That way, ENSURE_MSYSTEM_IS_SET >> is not defined to "" (two double-quotes), so #ifdef ENSURE_MSYSTEM_IS_SET >> would not kick in. >> >>