summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2008-05-04 18:04:51 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-06 16:50:17 -0700
commitbb1ae3f6fff19b0a1ab1bb6a815d26d39b9f15e6 (patch)
treed11c7e3846690f745e8c6998d56464f21a23e3c9 /config.c
parente83dbe802f24e017f2e3889272a70793c064d984 (diff)
downloadgit-bb1ae3f6fff19b0a1ab1bb6a815d26d39b9f15e6.tar.gz
commit: Show committer if automatic
To warn the user in case he/she might be using an unintended committer identity. Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index b0ada515b9..3bc4c7ed59 100644
--- a/config.c
+++ b/config.c
@@ -443,6 +443,8 @@ int git_default_config(const char *var, const char *value)
if (!value)
return config_error_nonbool(var);
strlcpy(git_default_name, value, sizeof(git_default_name));
+ if (git_default_email[0])
+ user_ident_explicitly_given = 1;
return 0;
}
@@ -450,6 +452,8 @@ int git_default_config(const char *var, const char *value)
if (!value)
return config_error_nonbool(var);
strlcpy(git_default_email, value, sizeof(git_default_email));
+ if (git_default_name[0])
+ user_ident_explicitly_given = 1;
return 0;
}