1
0
mirror of https://github.com/git/git.git synced 2024-09-08 03:50:44 +02:00

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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2024-07-13 21:08:23 +00:00 committed by Junio C Hamano
parent 92fe7c7d42
commit 877da5e208
2 changed files with 6 additions and 1 deletions

View File

@ -274,7 +274,7 @@ int sane_execvp(const char *file, char * const argv[])
return -1;
}
static char *git_shell_path(void)
char *git_shell_path(void)
{
#ifndef GIT_WINDOWS_NATIVE
return xstrdup(SHELL_PATH);

View File

@ -195,6 +195,11 @@ int is_executable(const char *name);
*/
int exists_in_PATH(const char *command);
/**
* Return the path that is used to execute Unix shell command-lines.
*/
char *git_shell_path(void);
/**
* Start a sub-process. Takes a pointer to a `struct child_process`
* that specifies the details and returns pipe FDs (if requested).