From: Eric Sunshine <sunshine@sunshineco.com>
To: Jeff King <peff@peff.net>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"David Rodríguez" <deivid.rodriguez@gmail.com>,
"Matthew Rothenberg" <mroth@khanacademy.org>,
"Git List" <git@vger.kernel.org>
Subject: Re: [PATCH] stop putting argv[0] dirname at front of PATH
Date: Wed, 22 Apr 2015 14:23:27 -0400 [thread overview]
Message-ID: <CAPig+cR1aAk053Lptq-vpsKtVP2nt9RF9YJxhNSicshEk7Ps7g@mail.gmail.com> (raw)
In-Reply-To: <20150422181402.GB3535@peff.net>
On Wed, Apr 22, 2015 at 2:14 PM, Jeff King <peff@peff.net> wrote:
> Subject: stop putting argv[0] dirname at front of PATH
>
> When the "git" wrapper is invoked, we prepend the baked-in
> exec-path to our PATH, so that any sub-processes we exec
> will all find the git-foo commands that match the wrapper
> version.
> [...]
> Given that the main motivation for git pulling the argv[0]
s/pulling/putting/
> dirname into the PATH has been broken for years, that the
> remaining cases are obscure and unlikely (and easily fixed
> by the user just setting up their $PATH sanely), and that
> the behavior is hurting real, reasonably common use cases,
> it's not worth continuing to do so.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> 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);
> --
> 2.4.0.rc2.498.g02440db
next prev parent reply other threads:[~2015-04-22 18:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 16:04 PATH modifications for git-hook processes Matthew Rothenberg
2015-04-14 17:17 ` Junio C Hamano
2015-04-15 15:00 ` Matthew Rothenberg
2015-04-16 6:17 ` Jeff King
2015-04-16 6:31 ` Jeff King
2015-04-22 0:39 ` David Rodríguez
2015-04-22 17:46 ` Junio C Hamano
2015-04-22 18:14 ` [PATCH] stop putting argv[0] dirname at front of PATH Jeff King
2015-04-22 18:23 ` Eric Sunshine [this message]
2015-04-22 18:36 ` Jeff King
2015-04-22 19:23 ` Jonathan Nieder
2015-04-22 20:00 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPig+cR1aAk053Lptq-vpsKtVP2nt9RF9YJxhNSicshEk7Ps7g@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=deivid.rodriguez@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mroth@khanacademy.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).