move git_default_* variables to ident.c

There's no reason anybody outside of ident.c should access
these directly (they should use the new accessors which make
sure the variables are initialized), so we can make them
file-scope statics.

While we're at it, move user_ident_explicitly_given into
ident.c; while still globally visible, it makes more sense
to reside with the ident code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2012-05-21 19:09:57 -04:00
committed by Junio C Hamano
parent 9597921b6c
commit 2d4b4fcebd
3 changed files with 4 additions and 6 deletions

View File

@ -7,7 +7,11 @@
*/
#include "cache.h"
#define MAX_GITNAME (1000)
static char git_default_name[MAX_GITNAME];
static char git_default_email[MAX_GITNAME];
static char git_default_date[50];
int user_ident_explicitly_given;
#ifdef NO_GECOS_IN_PWENT
#define get_gecos(ignored) "&"