From: Jonathan Nieder <jrnieder@gmail.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@vger.kernel.org
Subject: Re: [PATCH] stop putting argv[0] dirname at front of PATH
Date: Wed, 22 Apr 2015 12:23:17 -0700 [thread overview]
Message-ID: <20150422192317.GI5467@google.com> (raw)
In-Reply-To: <20150422181402.GB3535@peff.net>
Hi,
Jeff King wrote:
> This was added long
> ago by by 231af83 (Teach the "git" command to handle some
> commands internally, 2006-02-26), with the intent that
> things would just work if you did something like:
>
> cd /opt
> tar xzf premade-git-package.tar.gz
> alias git=/opt/git/bin/git
>
> as we would then find all of the related external commands
> in /opt/git/bin. I.e., it made git runtime-relocatable,
> since at the time of 231af83, we installed all of the git
> commands into $(bindir).
[...]
> And
> not just for finding binaries; we want to find $(sharedir),
> etc, the same way. The RUNTIME_PREFIX build knob does this
> the right way
Makes sense. For the reason you say (templatedir, etc) I am surprised
to hear that that was the motivation, but I can't find any other.
[...]
> Signed-off-by: Jeff King <peff@peff.net>
For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
[...]
> But note that you can't just
> flip on RUNTIME_PREFIX on non-Windows systems, as some invocations will
> get the full path to the executable, and others see just "git". You'd
> need to convert that into an absolute path (either by searching the
> $PATH, or doing something system-specific like looking in /proc/$$/exe).
Yep --- /proc/self/exe should work okay if someone wants "portable
git" to work on Linux.
Thanks,
Jonathan
next prev parent reply other threads:[~2015-04-22 19: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
2015-04-22 18:36 ` Jeff King
2015-04-22 19:23 ` Jonathan Nieder [this message]
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=20150422192317.GI5467@google.com \
--to=jrnieder@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.