diff options
Diffstat (limited to 'compat/mingw.c')
| -rw-r--r-- | compat/mingw.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index e433740381..42053c1f65 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -6,10 +6,16 @@ #include <wchar.h> #include "../strbuf.h" #include "../run-command.h" -#include "../cache.h" +#include "../abspath.h" +#include "../alloc.h" #include "win32/lazyload.h" #include "../config.h" +#include "../environment.h" +#include "../trace2.h" +#include "../symlinks.h" +#include "../wrapper.h" #include "dir.h" +#include "gettext.h" #define SECURITY_WIN32 #include <sspi.h> @@ -237,7 +243,8 @@ static int core_restrict_inherited_handles = -1; static enum hide_dotfiles_type hide_dotfiles = HIDE_DOTFILES_DOTGITONLY; static char *unset_environment_variables; -int mingw_core_config(const char *var, const char *value, void *cb) +int mingw_core_config(const char *var, const char *value, + const struct config_context *ctx, void *cb) { if (!strcmp(var, "core.hidedotfiles")) { if (value && !strcasecmp(value, "dotgitonly")) @@ -248,6 +255,8 @@ int mingw_core_config(const char *var, const char *value, void *cb) } if (!strcmp(var, "core.unsetenvvars")) { + if (!value) + return config_error_nonbool(var); free(unset_environment_variables); unset_environment_variables = xstrdup(value); return 0; @@ -1340,6 +1349,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) |
