From 7454ee3c623a6788d91fd3c97af134de33996cfa Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:16:00 +0100 Subject: rename git_config_from_buf to git_config_from_mem This matches the naming used in the index_{fd,mem,...} functions. Suggested-by: Junio C Hamano Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano --- cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index c63fcc113a..6679bb4e1a 100644 --- a/cache.h +++ b/cache.h @@ -1485,7 +1485,7 @@ struct git_config_source { 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 int git_config_from_buf(config_fn_t fn, const char *name, +extern int git_config_from_mem(config_fn_t fn, const char *name, const char *buf, size_t len, void *data); extern void git_config_push_parameter(const char *text); extern int git_config_from_parameters(config_fn_t fn, void *data); -- cgit v1.2.1 From 473166b99078a2724b4fcda11a6a5327b9af60da Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Fri, 19 Feb 2016 10:16:01 +0100 Subject: config: add 'origin_type' to config_source struct Use the config origin_type to print more detailed error messages that inform the user about the origin of a config error (file, stdin, blob). Helped-by: Ramsay Jones Signed-off-by: Lars Schneider Acked-by: Jeff King Signed-off-by: Junio C Hamano --- cache.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 6679bb4e1a..ad7fcfc0f2 100644 --- a/cache.h +++ b/cache.h @@ -1485,8 +1485,8 @@ struct git_config_source { 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 int git_config_from_mem(config_fn_t fn, const char *name, - const char *buf, size_t len, void *data); +extern int git_config_from_mem(config_fn_t fn, const char *origin_type, + const char *name, const char *buf, size_t len, void *data); extern void git_config_push_parameter(const char *text); extern int git_config_from_parameters(config_fn_t fn, void *data); extern void git_config(config_fn_t fn, void *); @@ -1525,6 +1525,8 @@ extern const char *get_log_output_encoding(void); extern const char *get_commit_output_encoding(void); extern int git_config_parse_parameter(const char *, config_fn_t fn, void *data); +extern const char *current_config_origin_type(void); +extern const char *current_config_name(void); struct config_include_data { int depth; -- cgit v1.2.1