Skip to content

Commit 4528023

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 09feffb commit 4528023

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cache.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,10 +1149,6 @@ struct config_include_data {
11491149
#define CONFIG_INCLUDE_INIT { 0 }
11501150
extern int git_config_include(const char *name, const char *value, void *data);
11511151

1152-
#define IDENT_NAME_GIVEN 01
1153-
#define IDENT_MAIL_GIVEN 02
1154-
#define IDENT_ALL_GIVEN (IDENT_NAME_GIVEN|IDENT_MAIL_GIVEN)
1155-
extern int user_ident_explicitly_given;
11561152
extern int user_ident_sufficiently_given(void);
11571153

11581154
extern const char *git_commit_encoding;

ident.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
static struct strbuf git_default_name = STRBUF_INIT;
1111
static struct strbuf git_default_email = STRBUF_INIT;
1212
static char git_default_date[50];
13-
int user_ident_explicitly_given;
13+
14+
#define IDENT_NAME_GIVEN 01
15+
#define IDENT_MAIL_GIVEN 02
16+
#define IDENT_ALL_GIVEN (IDENT_NAME_GIVEN|IDENT_MAIL_GIVEN)
17+
static int user_ident_explicitly_given;
1418

1519
#ifdef NO_GECOS_IN_PWENT
1620
#define get_gecos(ignored) "&"

0 commit comments

Comments
 (0)