Junio C Hamano <gitster@xxxxxxxxx> writes: > ... So even if the standard allowed the > returned value to be volatile across calls to getenv(3),... > ... > In fact, > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/getenv.html > > says that only ... Apparently I wasn't even reading what I was quoting carefully enough. The above does include getenv() as one of the functions that are allowed to invalidate earlier return values. Sorry about that. I'll go back to bed (I am a bit under the weather and OOO today). The conclusion in my original message is still valid. > Having said that, we do have codepaths to update a handful of > environment variables ourselves (GIT_DIR is among them), so I think > your patch is a good safety measure in general. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html