From: Junio C Hamano Date: Mon, 05 Jun 2006 19:45:18 GMT Subject: Re: [PATCH] Fix git_setup_directory_gently when GIT_DIR is set Message-ID: <7vodx74ca9.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin writes: > When calling git_setup_directory_gently, and GIT_DIR was set, it just > ignored the variable nongit_ok. Hmph. Is this really a breakage? That is, gently() is meant for a case where you do not know if you even find a git repository and tell it not to complain because you are prepared for the case where you are not in a git repository. If the environment has an incorrect GIT_DIR, I think that falls into a different category. It is more like "the user or calling script says we have GIT_DIR there but it is corrupt and unusable". I do not have a strong opinion on this, though. If you have two commands in your script, the first of which does gently() with such an environment, your change may allow that first command to succeed, but if the second command does not say nongit_ok, it would die() there anyway.