Re: [PATCH] t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH
- From
Brian Gernhardt <benji@silverinsanity.com>
- Date
- Nov 11, 2007, 17:49 UTC
- Message-ID
- <2AE2E502-7942-449E-B847-75876A5DAF37@silverinsanity.com>
- In-Reply-To
- <Pine.LNX.4.64.0711111742010.4362@racer.site>
On Nov 11, 2007, at 12:44 PM, Johannes Schindelin wrote:
Show 19 quoted lines
> Hi, > > On Sun, 11 Nov 2007, Björn Steinbrink wrote: > >> The git wrapper executable always prepends the GIT_EXEC_PATH build >> variable to the current PATH, so prepending "." to the PATH is not >> enough to give precedence to the fake vi executable. >> >> The --exec-path option allows to prepend a directory to PATH even >> before >> GIT_EXEC_PATH (which is added anyway), so we can use that instead. > > Hmm. This will probably stop working when you do not have git > installed, > because you now tell git to search for git programs in ".", where > they are > not. Probably git-commit executes your installed write-tree, commit- > tree > and friends, instead of the compiled ones.
You are wrong there. From exec_cmd.c:setup_path() (lines 51-54):
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, cmd_path);So the path with this patch will still include the build directory before the install location.
~~ Brian