]> granicus.if.org Git - git/commitdiff
git-compat-util.h: move SHELL_PATH default into header
authorKyle J. McKay <mackyle@gmail.com>
Sun, 8 Mar 2015 05:07:59 +0000 (21:07 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2015 22:11:24 +0000 (15:11 -0700)
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 <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h
run-command.c

index 8b72e2a8ddeb3f587707232a38a8c85688367dfb..f55234dd27f6720a36730dc1660a10108dee55d5 100644 (file)
@@ -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
index 0b432cc9713251b4d116bedf52ae1f51bd9d80cf..3afb124c79dcb234344e17795205153d4a2e0643 100644 (file)
@@ -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));