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
diff options
context:
space:
mode:
authorMatthias Aßhauer <mha1993@live.de>2023-08-04 07:08:42 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-04 07:21:07 +0300
commitbb532b534547d0a6b203baaf2f3379d987f611b9 (patch)
tree1f8353109dd5773900943b337b91edc3dd91cb96 /run-command.c
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3 (diff)
run-command: conditionally define locate_in_PATH()
This commit doesn't change any behaviour by itself, but allows us to easily define compat replacements for locate_in_PATH(). It prepares us for the next commit that adds a native Windows implementation of locate_in_PATH(). Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c
index 60c9419866..85fc150728 100644
--- a/run-command.c
+++ b/run-command.c
@@ -170,6 +170,7 @@ int is_executable(const char *name)
return st.st_mode & S_IXUSR;
}
+#ifndef locate_in_PATH
/*
* Search $PATH for a command. This emulates the path search that
* execvp would perform, without actually executing the command so it
@@ -218,6 +219,7 @@ static char *locate_in_PATH(const char *file)
strbuf_release(&buf);
return NULL;
}
+#endif
int exists_in_PATH(const char *command)
{