Skip to content

Commit

Permalink
Merge branch 'jk/git-no-more-argv0-path-munging'
Browse files Browse the repository at this point in the history
We have prepended $GIT_EXEC_PATH and the path "git" is installed in
(typically "/usr/bin") to $PATH when invoking subprograms and hooks
for almost eternity, but the original use case the latter tried to
support was semi-bogus (i.e. install git to /opt/foo/git and run it
without having /opt/foo on $PATH), and more importantly it has
become less and less relevant as Git grew more mainstream (i.e. the
users would _want_ to have it on their $PATH).  Stop prepending the
path in which "git" is installed to users' $PATH, as that would
interfere the command search order people depend on (e.g. they may
not like versions of programs that are unrelated to Git in /usr/bin
and want to override them by having different ones in /usr/local/bin
and have the latter directory earlier in their $PATH).

* jk/git-no-more-argv0-path-munging:
  stop putting argv[0] dirname at front of PATH
  • Loading branch information
gitster committed May 19, 2015
2 parents 20cf8b5 + a0b4507 commit 1645dbe
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion exec_cmd.c
Expand Up @@ -96,7 +96,6 @@ void setup_path(void)
struct strbuf new_path = STRBUF_INIT;

add_path(&new_path, git_exec_path());
add_path(&new_path, argv0_path);

if (old_path)
strbuf_addstr(&new_path, old_path);
Expand Down

0 comments on commit 1645dbe

Please sign in to comment.