Skip to content

Commit 3ddf096

Browse files
peffgitster
authored andcommitted
config: make environment parsing routines static
Nobody outside of git_config_from_parameters should need to use the GIT_CONFIG_PARAMETERS parsing functions, so let's make them private. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dbdf585 commit 3ddf096

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cache.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,6 @@ typedef int (*config_fn_t)(const char *, const char *, void *);
982982
extern int git_default_config(const char *, const char *, void *);
983983
extern int git_config_from_file(config_fn_t fn, const char *, void *);
984984
extern void git_config_push_parameter(const char *text);
985-
extern int git_config_parse_parameter(const char *text);
986-
extern int git_config_parse_environment(void);
987985
extern int git_config_from_parameters(config_fn_t fn, void *data);
988986
extern int git_config(config_fn_t fn, void *);
989987
extern int git_config_early(config_fn_t fn, void *, const char *repo_config);

config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void git_config_push_parameter(const char *text)
4848
strbuf_release(&env);
4949
}
5050

51-
int git_config_parse_parameter(const char *text)
51+
static int git_config_parse_parameter(const char *text)
5252
{
5353
struct config_item *ct;
5454
struct strbuf tmp = STRBUF_INIT;
@@ -75,7 +75,7 @@ int git_config_parse_parameter(const char *text)
7575
return 0;
7676
}
7777

78-
int git_config_parse_environment(void) {
78+
static int git_config_parse_environment(void) {
7979
const char *env = getenv(CONFIG_DATA_ENVIRONMENT);
8080
char *envw;
8181
const char **argv = NULL;

0 commit comments

Comments
 (0)