summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2008-07-21 21:19:52 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-25 17:41:13 -0700
commite1464ca7bb0d705210ba7198f004b2fb2b807e12 (patch)
tree853d900a35dffa52c1001f3408eca528229afe5c /shell.c
parent46beb55988e68da04c2e9d319c71b9b940f0854c (diff)
downloadgit-e1464ca7bb0d705210ba7198f004b2fb2b807e12.tar.gz
Record the command invocation path early
We will need the command invocation path in system_path(). This path was passed to setup_path(), but system_path() can be called earlier, for example via: main commit_pager_choice setup_pager git_config git_etc_gitconfig system_path Therefore, we introduce git_set_argv0_path() and call it as soon as possible. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell.c b/shell.c
index 91ca7de082..6a48de05ff 100644
--- a/shell.c
+++ b/shell.c
@@ -15,7 +15,7 @@ static int do_generic_cmd(const char *me, char *arg)
{
const char *my_argv[4];
- setup_path(NULL);
+ setup_path();
if (!arg || !(arg = sq_dequote(arg)))
die("bad argument");
if (prefixcmp(me, "git-"))
@@ -37,7 +37,7 @@ static int do_cvs_cmd(const char *me, char *arg)
if (!arg || strcmp(arg, "server"))
die("git-cvsserver only handles server: %s", arg);
- setup_path(NULL);
+ setup_path();
return execv_git_cmd(cvsserver_argv);
}