Skip to content

Commit 877da5e

Browse files
dschogitster
authored andcommitted
run-command: declare the git_shell_path() function globally
The intention is to use it in `git var GIT_SHELL_PATH`, therefore we need this function to stop being file-local only. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 92fe7c7 commit 877da5e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

run-command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ int sane_execvp(const char *file, char * const argv[])
274274
return -1;
275275
}
276276

277-
static char *git_shell_path(void)
277+
char *git_shell_path(void)
278278
{
279279
#ifndef GIT_WINDOWS_NATIVE
280280
return xstrdup(SHELL_PATH);

run-command.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ int is_executable(const char *name);
195195
*/
196196
int exists_in_PATH(const char *command);
197197

198+
/**
199+
* Return the path that is used to execute Unix shell command-lines.
200+
*/
201+
char *git_shell_path(void);
202+
198203
/**
199204
* Start a sub-process. Takes a pointer to a `struct child_process`
200205
* that specifies the details and returns pipe FDs (if requested).

0 commit comments

Comments
 (0)