aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-07-17 10:47:27 -0700
committerJunio C Hamano <gitster@pobox.com>2024-07-17 10:47:27 -0700
commit76e018b9a104d4449651f1e3b00b4e0d9a369e87 (patch)
treee4c6d30873faa4523602f9d324dba3a5250c9240 /builtin
parentMerge branch 'ps/doc-http-empty-cookiefile' (diff)
parentvar(win32): do report the GIT_SHELL_PATH that is actually used (diff)
downloadgit-76e018b9a104d4449651f1e3b00b4e0d9a369e87.tar.gz
git-76e018b9a104d4449651f1e3b00b4e0d9a369e87.zip
Merge branch 'js/var-git-shell-path'
"git var GIT_SHELL_PATH" should report the path to the shell used to spawn external commands, but it didn't do so on Windows, which has been corrected. * js/var-git-shell-path: var(win32): do report the GIT_SHELL_PATH that is actually used run-command: declare the `git_shell_path()` function globally run-command(win32): resolve the path to the Unix shell early mingw(is_msys2_sh): handle forward slashes in the `sh.exe` path, too win32: override `fspathcmp()` with a directory separator-aware version strvec: declare the `strvec_push_nodup()` function globally run-command: refactor getting the Unix shell path into its own function
Diffstat (limited to 'builtin')
-rw-r--r--builtin/var.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/var.c b/builtin/var.c
index 5dc384810c..e30ff45be1 100644
--- a/builtin/var.c
+++ b/builtin/var.c
@@ -12,6 +12,7 @@
#include "refs.h"
#include "path.h"
#include "strbuf.h"
+#include "run-command.h"
static const char var_usage[] = "git var (-l | <variable>)";
@@ -51,7 +52,7 @@ static char *default_branch(int ident_flag UNUSED)
static char *shell_path(int ident_flag UNUSED)
{
- return xstrdup(SHELL_PATH);
+ return git_shell_path();
}
static char *git_attr_val_system(int ident_flag UNUSED)