From: Kyle J. McKay Date: Sun, 8 Mar 2015 05:07:59 +0000 (-0800) Subject: git-compat-util.h: move SHELL_PATH default into header X-Git-Tag: v2.4.0-rc0~35^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1b56cdf901f6e6a73d0edadf56afb1c878c7622a?ds=inline;hp=-c git-compat-util.h: move SHELL_PATH default into header If SHELL_PATH is not defined we use "/bin/sh". However, run-command.c is not the only file that needs to use the default value so move it into a common header. Signed-off-by: Kyle J. McKay Signed-off-by: Junio C Hamano --- 1b56cdf901f6e6a73d0edadf56afb1c878c7622a diff --git a/git-compat-util.h b/git-compat-util.h index 8b72e2a8dd..f55234dd27 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -872,4 +872,8 @@ struct tm *git_gmtime_r(const time_t *, struct tm *); #define gmtime_r git_gmtime_r #endif +#ifndef SHELL_PATH +# define SHELL_PATH "/bin/sh" +#endif + #endif diff --git a/run-command.c b/run-command.c index 0b432cc971..3afb124c79 100644 --- a/run-command.c +++ b/run-command.c @@ -4,10 +4,6 @@ #include "sigchain.h" #include "argv-array.h" -#ifndef SHELL_PATH -# define SHELL_PATH "/bin/sh" -#endif - void child_process_init(struct child_process *child) { memset(child, 0, sizeof(*child));