diff options
author | Scott R Parish <srp@srparish.net> | 2007-10-28 04:17:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-29 20:51:37 -0700 |
commit | 511707d42b3b3e57d9623493092590546ffeae80 (patch) | |
tree | 7d37f2f06ad9f66c0595526332d7f8ac19a9c67e /exec_cmd.h | |
parent | 0966003c8e8d1528912b10667b903cd981e3a7f6 (diff) | |
download | git-511707d42b3b3e57d9623493092590546ffeae80.tar.gz |
use only the $PATH for exec'ing git commands
We need to correctly set up $PATH for non-c based git commands.
Since we already do this, we can just use that $PATH and execvp,
instead of looping over the paths with execve.
This patch adds a setup_path() function to exec_cmd.c, which sets
the $PATH order correctly for our search order. execv_git_cmd() is
stripped down to setting up argv and calling execvp(). git.c's
main() only only needs to call setup_path().
Signed-off-by: Scott R Parish <srp@srparish.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.h')
-rw-r--r-- | exec_cmd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/exec_cmd.h b/exec_cmd.h index da99287552..a892355c82 100644 --- a/exec_cmd.h +++ b/exec_cmd.h @@ -3,6 +3,7 @@ extern void git_set_argv_exec_path(const char *exec_path); extern const char* git_exec_path(void); +extern void setup_path(const char *); extern int execv_git_cmd(const char **argv); /* NULL terminated */ extern int execl_git_cmd(const char *cmd, ...); |