mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
dbdf5854b2
commit
3ddf0968c2
2
cache.h
2
cache.h
@ -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_default_config(const char *, const char *, void *);
|
||||||
extern int git_config_from_file(config_fn_t fn, 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 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_from_parameters(config_fn_t fn, void *data);
|
||||||
extern int git_config(config_fn_t fn, void *);
|
extern int git_config(config_fn_t fn, void *);
|
||||||
extern int git_config_early(config_fn_t fn, void *, const char *repo_config);
|
extern int git_config_early(config_fn_t fn, void *, const char *repo_config);
|
||||||
|
4
config.c
4
config.c
@ -48,7 +48,7 @@ void git_config_push_parameter(const char *text)
|
|||||||
strbuf_release(&env);
|
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 config_item *ct;
|
||||||
struct strbuf tmp = STRBUF_INIT;
|
struct strbuf tmp = STRBUF_INIT;
|
||||||
@ -75,7 +75,7 @@ int git_config_parse_parameter(const char *text)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int git_config_parse_environment(void) {
|
static int git_config_parse_environment(void) {
|
||||||
const char *env = getenv(CONFIG_DATA_ENVIRONMENT);
|
const char *env = getenv(CONFIG_DATA_ENVIRONMENT);
|
||||||
char *envw;
|
char *envw;
|
||||||
const char **argv = NULL;
|
const char **argv = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user