Skip to content

Commit

Permalink
run-command: declare the git_shell_path() function globally
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dscho committed Jul 11, 2024
1 parent 84b7e2f commit 1c8185d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions run-command.h
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 1c8185d

Please sign in to comment.