diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-10-30 19:40:04 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-31 04:46:21 +0100 |
commit | 70fc5793dfdf8ba8586ca130674f6896eb3eb37a (patch) | |
tree | bd1dd8ab11a2178c92f92d7f6cca7dd029a44d77 /compat | |
parent | config: rename `dummy` parameter to `cb` in git_default_config() (diff) | |
download | git-70fc5793dfdf8ba8586ca130674f6896eb3eb37a.tar.xz git-70fc5793dfdf8ba8586ca130674f6896eb3eb37a.zip |
config: allow for platform-specific core.* config settings
In the Git for Windows project, we have ample precendent for config
settings that apply to Windows, and to Windows only.
Let's formalize this concept by introducing a platform_core_config()
function that can be #define'd in a platform-specific manner.
This will allow us to contain platform-specific code better, as the
corresponding variables no longer need to be exported so that they can
be defined in environment.c and be set in config.c
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 5 | ||||
-rw-r--r-- | compat/mingw.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 81ef24286a..293f286af1 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -203,6 +203,11 @@ static int ask_yes_no_if_possible(const char *format, ...) } } +int mingw_core_config(const char *var, const char *value, void *cb) +{ + return 0; +} + /* Normalizes NT paths as returned by some low-level APIs. */ static wchar_t *normalize_ntpath(wchar_t *wbuf) { diff --git a/compat/mingw.h b/compat/mingw.h index f31dcff2be..e9d2b9cdd3 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, void *cb); +#define platform_core_config mingw_core_config + /* * things that are not available in header files */ |