Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-08-10 02:18:15 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-10 02:18:16 +0300
commit8cdd5e713d7ba54b9d26ac997408bb745ab55088 (patch)
tree89df70d128a7f41f454a9eb29cdac0dfe86b994d /compat
parentb6e2a0c0b30dccd050706354eaa64a9e8ed900e5 (diff)
parentfff1594fa77372ea7a51f6b445267f23fdbf3089 (diff)
Merge branch 'ma/locate-in-path-for-windows'
"git bisect visualize" stopped running "gitk" on Git for Windows when the command was reimplemented in C around Git 2.34 timeframe. This has been corrected. * ma/locate-in-path-for-windows: docs: update when `git bisect visualize` uses `gitk` compat/mingw: implement a native locate_in_PATH() run-command: conditionally define locate_in_PATH()
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c5
-rw-r--r--compat/mingw.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index f7f5d0ce0c..ec5280da16 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1347,6 +1347,11 @@ static char *path_lookup(const char *cmd, int exe_only)
return prog;
}
+char *mingw_locate_in_PATH(const char *cmd)
+{
+ return path_lookup(cmd, 0);
+}
+
static const wchar_t *wcschrnul(const wchar_t *s, wchar_t c)
{
while (*s && *s != c)
diff --git a/compat/mingw.h b/compat/mingw.h
index 5e34c87347..6aec50e412 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -177,6 +177,9 @@ pid_t waitpid(pid_t pid, int *status, int options);
#define kill mingw_kill
int mingw_kill(pid_t pid, int sig);
+#define locate_in_PATH mingw_locate_in_PATH
+char *mingw_locate_in_PATH(const char *cmd);
+
#ifndef NO_OPENSSL
#include <openssl/ssl.h>
static inline int mingw_SSL_set_fd(SSL *ssl, int fd)