mirror of
https://github.com/git/git.git
synced 2026-01-23 17:05:38 +00:00
fixup! Allow for platform-specific core.* config settings
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -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
|
||||
|
||||
/*
|
||||
|
||||
6
config.c
6
config.c
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user