summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-21 19:09:54 -0400
committerJunio C Hamano <gitster@pobox.com>2012-05-22 09:07:53 -0700
commit9597921b6c173d90359e2cfa4c2e36de8d1554e6 (patch)
tree36828f30283c0aedb451678417905cafd14cc705 /config.c
parente21ab1340a1a22f017e9c3e4fc0deb9f4de36917 (diff)
downloadgit-9597921b6c173d90359e2cfa4c2e36de8d1554e6.tar.gz
move identity config parsing to ident.c
There's no reason for this to be in config, except that once upon a time all of the config parsing was there. It makes more sense to keep the ident code together. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/config.c b/config.c
index eeee986022..71ef171cab 100644
--- a/config.c
+++ b/config.c
@@ -762,28 +762,6 @@ static int git_default_core_config(const char *var, const char *value)
return 0;
}
-static int git_default_user_config(const char *var, const char *value)
-{
- if (!strcmp(var, "user.name")) {
- if (!value)
- return config_error_nonbool(var);
- strlcpy(git_default_name, value, sizeof(git_default_name));
- user_ident_explicitly_given |= IDENT_NAME_GIVEN;
- return 0;
- }
-
- if (!strcmp(var, "user.email")) {
- if (!value)
- return config_error_nonbool(var);
- strlcpy(git_default_email, value, sizeof(git_default_email));
- user_ident_explicitly_given |= IDENT_MAIL_GIVEN;
- return 0;
- }
-
- /* Add other config variables here and to Documentation/config.txt. */
- return 0;
-}
-
static int git_default_i18n_config(const char *var, const char *value)
{
if (!strcmp(var, "i18n.commitencoding"))
@@ -870,7 +848,7 @@ int git_default_config(const char *var, const char *value, void *dummy)
return git_default_core_config(var, value);
if (!prefixcmp(var, "user."))
- return git_default_user_config(var, value);
+ return git_ident_config(var, value, dummy);
if (!prefixcmp(var, "i18n."))
return git_default_i18n_config(var, value);