From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>,
Brian Gernhardt <benji@silverinsanity.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] Use the best available exec path only
Date: Sun, 11 Nov 2007 20:50:40 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0711112047170.4362@racer.site> (raw)
In-Reply-To: <20071111203318.GA32671@atjola.homenet>
Hi,
On Sun, 11 Nov 2007, Bj?rn Steinbrink wrote:
> On 2007.11.11 11:43:02 -0800, Junio C Hamano wrote:
> > Brian Gernhardt <benji@silverinsanity.com> writes:
> >
> > > I'm sorry, I should have been more clear. I was referring to the
> > > GIT_EXEC_PATH build variable, not the environment variable. The git
> > > wrapper always adds the path determined during build to the front of
> > > PATH. When I was changing my build script, this got set to "/usr/
> > > local/bin" (I usually use /usr/local/stow/git, instead). Since I
> > > have a /usr/local/bin/vim, PATH for git-commit.sh during the test
> > > was:
> > >
> > > - my git build directory
> > > - /usr/local/bin (containing a symlink vi -> vim)
> > > - the t/trash directory, added by the test via `PATH=".:$PATH"`
> > > (containing the test vi script)
> > > - my normal path
> >
> > Maybe that is what is broken. t/test-lib.sh makes the environment
> > variable point at the build directory, and that should override the
> > path that is compiled in, shouldn't it?
>
> Maybe you prefer this patch then? "make test" survived up to 9101/25,
> but that fails with the current master anyway and I didn't bother to run
> the remaining tests manually, so it seems to be fine. Might break some
> weird setups that rely on being able to set multiple additional paths
> though (not that I think that that is a good idea to begin with).
>
> Bj?rn
> ---
> Instead of adding all possible exec paths to PATH, only add the best
> one, following the same rules that --exec-path, without arguments, uses
> to figure out which path to display.
>
> Signed-off-by: Bj?rn Steinbrink <B.Steinbrink@gmx.de>
> ---
For easy application by the maintainer, please make the commit message the
first part, then have a single "---", and then the quoted mail.
> diff --git a/exec_cmd.c b/exec_cmd.c
> index 2d0a758..9c376ad 100644
> --- a/exec_cmd.c
> +++ b/exec_cmd.c
> @@ -48,9 +48,7 @@ void setup_path(const char *cmd_path)
>
> strbuf_init(&new_path, 0);
>
> - add_path(&new_path, argv_exec_path);
> - add_path(&new_path, getenv(EXEC_PATH_ENVIRONMENT));
> - add_path(&new_path, builtin_exec_path);
> + add_path(&new_path, git_exec_path());
> add_path(&new_path, cmd_path);
I wonder why cmd_path is still there, then. (I'd have expected something
like
add_path(&new_path, cmd_path ? cmd_path : git_exec_path());
In related news, IMO cmd_path should be made absolute if it is not already
the case.
Ciao,
Dscho
next prev parent reply other threads:[~2007-11-11 20:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 22:03 t7005 and vi in GIT_EXEC_PATH Brian Gernhardt
2007-11-10 22:09 ` David Kastrup
2007-11-10 22:45 ` Brian Gernhardt
2007-11-11 15:58 ` Johannes Schindelin
2007-11-11 16:10 ` Brian Gernhardt
2007-11-11 16:28 ` Johannes Schindelin
2007-11-11 19:43 ` Junio C Hamano
2007-11-11 20:33 ` [PATCH] Use the best available exec path only Björn Steinbrink
2007-11-11 20:50 ` Johannes Schindelin [this message]
2007-11-11 21:12 ` Jakub Narebski
2007-11-11 21:17 ` Björn Steinbrink
2007-11-11 21:40 ` Johannes Schindelin
2007-11-11 21:29 ` t7005 and vi in GIT_EXEC_PATH Junio C Hamano
2007-11-11 17:38 ` [PATCH] t7005-editor.sh: Don't invoke real vi when it is " Björn Steinbrink
2007-11-11 17:44 ` Johannes Schindelin
2007-11-11 17:49 ` Brian Gernhardt
2007-11-11 18:31 ` Johannes Schindelin
2007-11-11 18:01 ` Björn Steinbrink
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=Pine.LNX.4.64.0711112047170.4362@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=B.Steinbrink@gmx.de \
--cc=benji@silverinsanity.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).