From: Thomas Rast <trast@student.ethz.ch>
To: Dominique Quatravaux <domq@google.com>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH] Locate git helpers with type -P, for when git --exec-path is multivalued
Date: Thu, 22 Mar 2012 10:43:36 +0100 [thread overview]
Message-ID: <87pqc5ged3.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <1332407219-7774-1-git-send-email-domq@google.com> (Dominique Quatravaux's message of "Thu, 22 Mar 2012 10:06:59 +0100")
Dominique Quatravaux <domq@google.com> writes:
> Under a setting of (eg) GIT_EXEC_PATH=/home/joe/bin:/usr/lib/git-core,
> constructs such as
>
> . "$(git --exec-path)"/git-sh-setup
>
> do not work. The proper way is
>
> . "$(PATH="$(git --exec-path)" type -p git-sh-setup)"
NAK. The documented(!) way of loading git-sh-setup is
. "$(git --exec-path)/git-sh-setup"
and we can't break that. I don't know where you are getting your
multivalued GIT_EXEC_PATH from, but there are other places in the code
that assume a single path, too. For example, the callchain (irrelevant
stuff snipped)
void setup_path(void)
{
add_path(&new_path, git_exec_path());
}
static void add_path(struct strbuf *out, const char *path)
{
if (path && *path) {
if (is_absolute_path(path))
strbuf_addstr(out, path);
else
strbuf_addstr(out, absolute_path(path));
strbuf_addch(out, PATH_SEP);
}
}
makes no sense at is_absolute_path(path) if path is multivalued.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2012-03-22 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 9:06 [PATCH] Locate git helpers with type -P, for when git --exec-path is multivalued Dominique Quatravaux
2012-03-22 9:43 ` Thomas Rast [this message]
2012-03-22 10:24 ` Dominique Quatravaux
2012-03-22 9:46 ` Andreas Schwab
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=87pqc5ged3.fsf@thomas.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=domq@google.com \
--cc=git@vger.kernel.org \
/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.