summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d136452)
raw | patch | inline | side by side (parent: d136452)
author | Linus Torvalds <torvalds@linux-foundation.org> | |
Wed, 18 Jun 2008 22:00:11 +0000 (15:00 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Jun 2008 23:50:32 +0000 (16:50 -0700) |
.. just to finish it off. We'll leave the pager color config alone,
since it is such an odd-ball special case anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
since it is such an odd-ball special case anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c | patch | blob | history |
diff --git a/config.c b/config.c
index ee7642bf6c8e001fbd3d5ef51392d45e9f070dab..9d14a74f8261f4b658372f21b54a5ea21b31bb8a 100644 (file)
--- a/config.c
+++ b/config.c
return 0;
}
-int git_default_config(const char *var, const char *value, void *dummy)
+static int git_default_i18n_config(const char *var, const char *value)
{
- if (!prefixcmp(var, "core."))
- return git_default_core_config(var, value);
-
- if (!prefixcmp(var, "user."))
- return git_default_user_config(var, value);
-
if (!strcmp(var, "i18n.commitencoding"))
return git_config_string(&git_commit_encoding, var, value);
if (!strcmp(var, "i18n.logoutputencoding"))
return git_config_string(&git_log_output_encoding, var, value);
- if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
- pager_use_color = git_config_bool(var,value);
- return 0;
- }
+ /* Add other config variables here and to Documentation/config.txt. */
+ return 0;
+}
+static int git_default_branch_config(const char *var, const char *value)
+{
if (!strcmp(var, "branch.autosetupmerge")) {
if (value && !strcasecmp(value, "always")) {
git_branch_track = BRANCH_TRACK_ALWAYS;
return 0;
}
+int git_default_config(const char *var, const char *value, void *dummy)
+{
+ if (!prefixcmp(var, "core."))
+ return git_default_core_config(var, value);
+
+ if (!prefixcmp(var, "user."))
+ return git_default_user_config(var, value);
+
+ if (!prefixcmp(var, "i18n."))
+ return git_default_i18n_config(var, value);
+
+ if (!prefixcmp(var, "branch."))
+ return git_default_branch_config(var, value);
+
+ if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
+ pager_use_color = git_config_bool(var,value);
+ return 0;
+ }
+
+ /* Add other config variables here and to Documentation/config.txt. */
+ return 0;
+}
+
int git_config_from_file(config_fn_t fn, const char *filename, void *data)
{
int ret;