From e1464ca7bb0d705210ba7198f004b2fb2b807e12 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 21 Jul 2008 21:19:52 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- exec_cmd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'exec_cmd.h') diff --git a/exec_cmd.h b/exec_cmd.h index 7eb94e5e11..0c46cd5636 100644 --- a/exec_cmd.h +++ b/exec_cmd.h @@ -2,8 +2,9 @@ #define GIT_EXEC_CMD_H extern void git_set_argv_exec_path(const char *exec_path); +extern void git_set_argv0_path(const char *path); extern const char* git_exec_path(void); -extern void setup_path(const char *); +extern void setup_path(void); extern int execv_git_cmd(const char **argv); /* NULL terminated */ extern int execl_git_cmd(const char *cmd, ...); extern const char *system_path(const char *path); -- cgit v1.2.3