summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-13 14:37:20 +0100
committerJunio C Hamano <gitster@pobox.com>2018-11-13 14:37:20 +0100
commit6c268fdda9dcc421e2bee1ce76496d3e9f96397f (patch)
tree2181f2032e963eef5f5d95968db797435cfefd83 /config.c
parentMerge branch 'js/mingw-isatty-and-dup2' (diff)
parentmingw: unset PERL5LIB by default (diff)
downloadgit-6c268fdda9dcc421e2bee1ce76496d3e9f96397f.tar.xz
git-6c268fdda9dcc421e2bee1ce76496d3e9f96397f.zip
Merge branch 'js/mingw-perl5lib'
Windows fix. * js/mingw-perl5lib: mingw: unset PERL5LIB by default config: move Windows-specific config settings into compat/mingw.c config: allow for platform-specific core.* config settings config: rename `dummy` parameter to `cb` in git_default_config()
Diffstat (limited to 'config.c')
-rw-r--r--config.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/config.c b/config.c
index aa0ed854f6..2ffd39c220 100644
--- a/config.c
+++ b/config.c
@@ -1093,7 +1093,7 @@ int git_config_color(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")) {
@@ -1344,14 +1344,6 @@ static int git_default_core_config(const char *var, const char *value)
return 0;
}
- if (!strcmp(var, "core.hidedotfiles")) {
- if (value && !strcasecmp(value, "dotgitonly"))
- hide_dotfiles = HIDE_DOTFILES_DOTGITONLY;
- else
- hide_dotfiles = git_config_bool(var, value);
- return 0;
- }
-
if (!strcmp(var, "core.partialclonefilter")) {
return git_config_string(&core_partial_clone_filter_default,
var, value);
@@ -1363,7 +1355,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, cb);
}
static int git_default_i18n_config(const char *var, const char *value)
@@ -1448,13 +1440,13 @@ static int git_default_mailmap_config(const char *var, const char *value)
return 0;
}
-int git_default_config(const char *var, const char *value, void *dummy)
+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, dummy);
+ return git_ident_config(var, value, cb);
if (starts_with(var, "i18n."))
return git_default_i18n_config(var, value);