summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-26 20:49:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-26 20:49:18 (GMT)
commitaf6d7a6231c30bb8bb7220085edb574e540bfa19 (patch)
tree76266cd491f9237283a2a56b0f7cc84205e152ca
parentaaa7e0d7f8f003c0c8ab34f959083f6d191d44ca (diff)
parenta0b4507ef72027052668c11b49f71bed89bcb293 (diff)
downloadgit-af6d7a6231c30bb8bb7220085edb574e540bfa19.zip
git-af6d7a6231c30bb8bb7220085edb574e540bfa19.tar.gz
git-af6d7a6231c30bb8bb7220085edb574e540bfa19.tar.bz2
Merge branch 'jk/git-no-more-argv0-path-munging' into maint
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
-rw-r--r--exec_cmd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/exec_cmd.c b/exec_cmd.c
index 8ab37b5..e85f0fd 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -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);