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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jun 9, 2011 at 11:56 UTC
2496844bb2e5410019bf51c10b1f3068b621fa27
2 files changed
+4
-2
cache.h
+2
@@ -1030,6 +1030,8 @@ extern int config_error_nonbool(const char *);
1030
extern const char *get_log_output_encoding(void);
1031
extern const char *get_commit_output_encoding(void);
1032
1033
+extern int git_config_parse_parameter(const char *, config_fn_t fn, void *data);
1034
+
1035
extern const char *config_exclusive_filename;
1036
1037
#define MAX_GITNAME (1000)
config.c
+2
-2
@@ -39,8 +39,8 @@ void git_config_push_parameter(const char *text)
39
strbuf_release(&env);
40
}
41
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)
44
{
45
struct strbuf **pair;
46
pair = strbuf_split_str(text, '=', 2);