fixup! Allow for platform-specific core.* config settings

This commit is contained in:
Johannes Schindelin
2017-08-30 15:28:53 +02:00
parent da751bae71
commit 2f36ab68e2
4 changed files with 6 additions and 6 deletions

View File

@@ -243,7 +243,7 @@ static char *unset_environment_variables;
int core_fscache;
int core_long_paths;
int mingw_core_config(const char *var, const char *value)
int mingw_core_config(const char *var, const char *value, void *cb)
{
if (!strcmp(var, "core.hidedotfiles")) {
if (value && !strcasecmp(value, "dotgitonly"))

View File

@@ -14,7 +14,7 @@ typedef _sigset_t sigset_t;
extern int core_fscache;
extern int core_long_paths;
extern int mingw_core_config(const char *var, const char *value);
extern int mingw_core_config(const char *var, const char *value, void *cb);
#define platform_core_config mingw_core_config
/*

View File

@@ -991,7 +991,7 @@ int git_config_pathname(const char **dest, const char *var, const char *value)
return 0;
}
static int git_default_core_config(const char *var, const char *value)
static int git_default_core_config(const char *var, const char *value, void *cb)
{
/* This needs a better name */
if (!strcmp(var, "core.filemode")) {
@@ -1235,7 +1235,7 @@ static int git_default_core_config(const char *var, const char *value)
}
/* Add other config variables here and to Documentation/config.txt. */
return platform_core_config(var, value);
return platform_core_config(var, value, cb);
}
static int git_default_i18n_config(const char *var, const char *value)
@@ -1323,7 +1323,7 @@ static int git_default_mailmap_config(const char *var, const char *value)
int git_default_config(const char *var, const char *value, void *cb)
{
if (starts_with(var, "core."))
return git_default_core_config(var, value);
return git_default_core_config(var, value, cb);
if (starts_with(var, "user."))
return git_ident_config(var, value, cb);

View File

@@ -394,7 +394,7 @@ typedef uintmax_t timestamp_t;
#endif
#ifndef platform_core_config
static inline int noop_core_config(const char *var, const char *value)
static inline int noop_core_config(const char *var, const char *value, void *cb)
{
return 0;
}