diff options
author | Johannes Sixt <j6t@kdbg.org> | 2009-03-21 23:21:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-21 21:45:14 -0700 |
commit | c90d565a46a664663467557d381417a3153fe26e (patch) | |
tree | 13695bb8fc92744f295ad08150106f8627c7b426 /t/t9108-git-svn-multi-glob.sh | |
parent | Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0 (diff) | |
download | tgif-c90d565a46a664663467557d381417a3153fe26e.tar.xz |
Propagate --exec-path setting to external commands via GIT_EXEC_PATH
Let PATH0=$PATH that was set before the invocation.
Let /foo be a build directory.
Let /pfx be the installation prefix.
Let pfxexecpath=/pfx/libexec/git-core.
The following is going on when 'git --exec-path=/foo gc' is invoked:
1. git sets PATH=/foo:$PATH0 using the path from --exec-path
2. gc execs 'git repack' (note: no dash).
3. Since there is a git in /foo (it's a build directory), /foo/git is
taken.
4. No explicit exec-path is set this time, hence, this secondary git sets
PATH=$pfxexecpath:/foo:$PATH
5. Since 'repack' is not a built-in, execv_dashed_external execs
'git-repack' (note: dash).
6. There is a $pfxexecpath/git-repack, and it is taken.
7. This git-repack runs 'git pack-objects' (note: no dash).
8. There is no git in $pfxexecpath, but there is one in /foo. Hence,
/foo/git is run.
9. pack-objects is a builtin, hence, in effect /foo/git-pack-objects
is run.
As you can see, the way in which we previously set the PATH allowed to
mix gits of different vintage. By setting GIT_EXEC_PATH when --exec-path
was given on the command line, we reduce the confusion.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9108-git-svn-multi-glob.sh')
0 files changed, 0 insertions, 0 deletions