Re: [PATCH 12/12] mingw: allow `git.exe` to be used instead of the "Git wrapper"
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Johannes Schindelin <[email protected]> writes: >> 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. >> 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. > 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. >> >>