diff --git a/compat/mingw.c b/compat/mingw.c index 3fbfda5978..97e953465e 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -202,6 +202,11 @@ static int ask_yes_no_if_possible(const char *format, ...) } } +int mingw_core_config(const char *var, const char *value) +{ + return 0; +} + int mingw_unlink(const char *pathname) { int ret, tries = 0; diff --git a/compat/mingw.h b/compat/mingw.h index 034fff9479..4f92bf9199 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -11,6 +11,9 @@ typedef _sigset_t sigset_t; #undef _POSIX_THREAD_SAFE_FUNCTIONS #endif +extern int mingw_core_config(const char *var, const char *value); +#define platform_core_config mingw_core_config + /* * things that are not available in header files */ diff --git a/config.c b/config.c index 83fdecb1bc..25f46f9fa0 100644 --- a/config.c +++ b/config.c @@ -1008,7 +1008,7 @@ static int git_default_core_config(const char *var, const char *value) } /* Add other config variables here and to Documentation/config.txt. */ - return 0; + return platform_core_config(var, value); } static int git_default_i18n_config(const char *var, const char *value) diff --git a/git-compat-util.h b/git-compat-util.h index 87237b092b..9355207be2 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -330,6 +330,14 @@ extern char *gitdirname(char *); #define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin" #endif +#ifndef platform_core_config +static inline int noop_core_config(const char *var, const char *value) +{ + return 0; +} +#define platform_core_config noop_core_config +#endif + #ifndef has_dos_drive_prefix static inline int git_has_dos_drive_prefix(const char *path) {