summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 806e2ad)
raw | patch | inline | side by side (parent: 806e2ad)
author | Linus Torvalds <torvalds@linux-foundation.org> | |
Wed, 18 Jun 2008 21:40:35 +0000 (14:40 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Jun 2008 23:50:23 +0000 (16:50 -0700) |
This follows the example of the "core" config, and splits out the
default "user" config option parsing into a helper routine.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
default "user" config option parsing into a helper routine.
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 c3597e0432f5ffd7c5e73f2fd71cedb7793b9b5e..ee7642bf6c8e001fbd3d5ef51392d45e9f070dab 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_user_config(const char *var, const char *value)
{
- if (!prefixcmp(var, "core."))
- return git_default_core_config(var, value);
-
if (!strcmp(var, "user.name")) {
if (!value)
return config_error_nonbool(var);
return 0;
}
+ /* Add other config variables here and to Documentation/config.txt. */
+ 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 (!strcmp(var, "i18n.commitencoding"))
return git_config_string(&git_commit_encoding, var, value);