diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-10-30 21:40:04 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-31 06:46:21 +0300 |
commit | 70fc5793dfdf8ba8586ca130674f6896eb3eb37a (patch) | |
tree | bd1dd8ab11a2178c92f92d7f6cca7dd029a44d77 /git-compat-util.h | |
parent | 409670f34ed5a2bc4f508f3aee9f809922b339dc (diff) |
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 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 96a3f86d8e..3a08d9916f 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -342,6 +342,14 @@ typedef uintmax_t timestamp_t; #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, void *cb) +{ + 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) { |