Skip to content

Commit 2496844

Browse files
peffgitster
authored andcommitted
config: make git_config_parse_parameter a public function
We use this internally to parse "git -c core.foo=bar", but the general format of "key=value" is useful for other places. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 615ff91 commit 2496844

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cache.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,8 @@ extern int config_error_nonbool(const char *);
10301030
extern const char *get_log_output_encoding(void);
10311031
extern const char *get_commit_output_encoding(void);
10321032

1033+
extern int git_config_parse_parameter(const char *, config_fn_t fn, void *data);
1034+
10331035
extern const char *config_exclusive_filename;
10341036

10351037
#define MAX_GITNAME (1000)

config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ void git_config_push_parameter(const char *text)
3939
strbuf_release(&env);
4040
}
4141

42-
static int git_config_parse_parameter(const char *text,
43-
config_fn_t fn, void *data)
42+
int git_config_parse_parameter(const char *text,
43+
config_fn_t fn, void *data)
4444
{
4545
struct strbuf **pair;
4646
pair = strbuf_split_str(text, '=', 2);

0 commit comments

Comments
 (0)