From: Junio C Hamano Date: Mon, 23 May 2011 19:59:34 GMT Subject: Re: [PATCH 3/3] git-mergetool--lib: Make vimdiff retain the current directory Message-ID: <7vipt1ur15.fsf@alter.siamese.dyndns.org> In-Reply-To: <1306058229-93800-3-git-send-email-davvid@gmail.com> David Aguilar writes: > +resolve_git_prefix() { > + # If GIT_PREFIX is empty then we cannot use it in tools > + # that expect to be able to chdir() to its value. > + if test -z "$GIT_PREFIX"; then > + GIT_PREFIX=. > + export GIT_PREFIX > + fi > +} Does this "export" have to be conditional? Otherwise, it would be simpler to do this upfront at the beginning: : GIT_PREFIX=${GIT_PREFIX:-.}