Skip to content

Commit

Permalink
git-compat-util.h: move SHELL_PATH default into header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kyle J. McKay authored and Junio C Hamano committed Mar 10, 2015
1 parent ff7a9dc commit 1b56cdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 1b56cdf

Please sign in to comment.