summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-26 13:37:17 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-26 13:37:17 -0800
commitdd0f567f1041a3caea7856b3efe20f8fb9b487b5 (patch)
tree8bfc020a02b0b440a0540d3a050cce8c0b71cc4b /cache.h
parent11529ecec914d2f0d7575e6d443c2d5a6ff75424 (diff)
parent70bd879ab66aeee809306908e3551d50cdf06802 (diff)
downloadgit-dd0f567f1041a3caea7856b3efe20f8fb9b487b5.tar.gz
Merge branch 'ls/config-origin'
The configuration system has been taught to phrase where it found a bad configuration variable in a better way in its error messages. "git config" learnt a new "--show-origin" option to indicate where the values come from. * ls/config-origin: config: add '--show-origin' option to print the origin of a config value config: add 'origin_type' to config_source struct rename git_config_from_buf to git_config_from_mem t: do not hide Git's exit code in tests using 'nul_to_q'
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 83b688cca6..61c6e0abe3 100644
--- a/cache.h
+++ b/cache.h
@@ -1508,8 +1508,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_buf(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 *);
@@ -1548,6 +1548,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;