summaryrefslogtreecommitdiff
path: root/ident.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-11-15 00:34:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-11-16 01:47:24 (GMT)
commit452802309c422ce71f1c038357ee0775af5fb3eb (patch)
treeaaa6a8c4b7faa9532cd0199314e68b1ce0b425dd /ident.c
parent09feffb633d9e27fa2f3b96ff7c367baa3164ce0 (diff)
downloadgit-452802309c422ce71f1c038357ee0775af5fb3eb.zip
git-452802309c422ce71f1c038357ee0775af5fb3eb.tar.gz
git-452802309c422ce71f1c038357ee0775af5fb3eb.tar.bz2
ident: make user_ident_explicitly_given static
In v1.5.6-rc0~56^2 (2008-05-04) "user_ident_explicitly_given" was introduced as a global for communication between config, ident, and builtin-commit. In v1.7.0-rc0~72^2 (2010-01-07) readers switched to using the common wrapper user_ident_sufficiently_given(). After v1.7.11-rc1~15^2~18 (2012-05-21), the var is only written in ident.c. Now we can make it static, which will enable further refactoring without worrying about upsetting other code. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ident.c')
-rw-r--r--ident.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ident.c b/ident.c
index a4bf206..733d69d 100644
--- a/ident.c
+++ b/ident.c
@@ -10,7 +10,11 @@
static struct strbuf git_default_name = STRBUF_INIT;
static struct strbuf git_default_email = STRBUF_INIT;
static char git_default_date[50];
-int user_ident_explicitly_given;
+
+#define IDENT_NAME_GIVEN 01
+#define IDENT_MAIL_GIVEN 02
+#define IDENT_ALL_GIVEN (IDENT_NAME_GIVEN|IDENT_MAIL_GIVEN)
+static int user_ident_explicitly_given;
#ifdef NO_GECOS_IN_PWENT
#define get_gecos(ignored) "&"