Re: [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 05, 2009 at 06:36:15PM -0500, Brandon Casey wrote:

> From: Junio C Hamano <gitster@xxxxxxxxx>
> 
> 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
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]