Skip to content

Commit

Permalink
config: make environment parsing routines static
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed May 24, 2011
1 parent dbdf585 commit 3ddf096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,6 @@ typedef int (*config_fn_t)(const char *, const char *, void *);
extern int git_default_config(const char *, const char *, void *);
extern int git_config_from_file(config_fn_t fn, const char *, void *);
extern void git_config_push_parameter(const char *text);
extern int git_config_parse_parameter(const char *text);
extern int git_config_parse_environment(void);
extern int git_config_from_parameters(config_fn_t fn, void *data);
extern int git_config(config_fn_t fn, void *);
extern int git_config_early(config_fn_t fn, void *, const char *repo_config);
Expand Down
4 changes: 2 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void git_config_push_parameter(const char *text)
strbuf_release(&env);
}

int git_config_parse_parameter(const char *text)
static int git_config_parse_parameter(const char *text)
{
struct config_item *ct;
struct strbuf tmp = STRBUF_INIT;
Expand All @@ -75,7 +75,7 @@ int git_config_parse_parameter(const char *text)
return 0;
}

int git_config_parse_environment(void) {
static int git_config_parse_environment(void) {
const char *env = getenv(CONFIG_DATA_ENVIRONMENT);
char *envw;
const char **argv = NULL;
Expand Down

0 comments on commit 3ddf096

Please sign in to comment.