mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
46beb55988
commit
e1464ca7bb
4
shell.c
4
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user