mirror of
https://github.com/git/git.git
synced 2024-11-05 00:37:55 +01:00
511707d42b
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>
11 lines
329 B
C
11 lines
329 B
C
#ifndef GIT_EXEC_CMD_H
|
|
#define GIT_EXEC_CMD_H
|
|
|
|
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, ...);
|
|
|
|
|
|
#endif /* GIT_EXEC_CMD_H */
|