summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLars Schneider <larsxschneider@gmail.com>2016-02-19 09:16:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-22 17:36:33 (GMT)
commit473166b99078a2724b4fcda11a6a5327b9af60da (patch)
treed20463aea79f73f32735816143441b67e7eca6a5 /cache.h
parent7454ee3c623a6788d91fd3c97af134de33996cfa (diff)
downloadgit-473166b99078a2724b4fcda11a6a5327b9af60da.zip
git-473166b99078a2724b4fcda11a6a5327b9af60da.tar.gz
git-473166b99078a2724b4fcda11a6a5327b9af60da.tar.bz2
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 <ramsay@ramsayjones.plus.com> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 6679bb4..ad7fcfc 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;