From: Jeff King Date: Mon, 08 Jun 2009 11:43:51 GMT Subject: Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH Message-ID: <20090608114351.GA13775@coredump.intra.peff.net> In-Reply-To: <67hZHClrEWQHxCRdWosE2_PLKo8HHFSCQIZrHMfucFNo_Bdy4p79XNP-MU8gnsUflWndiCqfhFM@cipher.nrlssc.navy.mil> On Fri, Jun 05, 2009 at 06:36:15PM -0500, Brandon Casey wrote: > From: Junio C Hamano > > Some platforms (like SunOS and family) have kept their common binaries at > some historical moment in time, and introduced new binaries with modern > features in a special location like /usr/xpg4/bin or /usr/ucb. Some of the > features provided by these modern binaries are expected and required by git. > If the featureful binaries are not in the users path, then git could end up > using the less featureful binary and fail. > > So provide a mechanism to prepend elements to the users PATH at runtime so > the modern binaries will be found. So this bit me already, and it's only been in next for a day. :) I _already_ have /usr/xpg4/bin in my PATH before /usr/bin, but with this patch, I get it stuck at the _beginning_ of my PATH automagically. Which overrides, against my wishes, the "even more sane than /usr/xpg4/bin" part of my PATH that comes at the beginning. Specifically, I have "~peff/local/bin" at the beginning of my PATH which contains a 'vi' that points to vim. Running "git rebase -i" now puts /usr/xpg4/bin at the beginning of the PATH (before ~peff/local/bin), which means I end up running the crappy system vi instead. For bonus fun, "git commit" still runs the correct 'vi' because it doesn't happen to be implemented as a shell script. Am I crazy for not having EDITOR=vim instead of EDITOR=vi? Perhaps. But I wanted to point out that tweaking the PATH behind the user's back does cause surprises in the real world. -Peff