summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:05 (GMT)
commitc9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb (patch)
tree47c0d32f51053046b1a47b3113d8803f2a7c1279 /cache.h
parent46bdfa3975665aaa9b7383466b529354d117e14d (diff)
parente145a0bc9b8711fe1c6cfad29af52ef06ce4c1ec (diff)
downloadgit-c9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb.zip
git-c9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb.tar.gz
git-c9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb.tar.bz2
Merge branch 'nd/conditional-config-in-early-config'
The recently introduced conditional inclusion of configuration did not work well when early-config mechanism was involved. * nd/conditional-config-in-early-config: config: correct file reading order in read_early_config() config: handle conditional include when $GIT_DIR is not set up config: prepare to pass more info in git_config_with_options()
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index ef0fe43..322ae58 100644
--- a/cache.h
+++ b/cache.h
@@ -1891,6 +1891,11 @@ enum config_origin_type {
CONFIG_ORIGIN_CMDLINE
};
+struct config_options {
+ unsigned int respect_includes : 1;
+ const char *git_dir;
+};
+
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 *);
@@ -1904,7 +1909,7 @@ extern void read_early_config(config_fn_t cb, void *data);
extern void git_config(config_fn_t fn, void *);
extern int git_config_with_options(config_fn_t fn, void *,
struct git_config_source *config_source,
- int respect_includes);
+ const struct config_options *opts);
extern int git_parse_ulong(const char *, unsigned long *);
extern int git_parse_maybe_bool(const char *);
extern int git_config_int(const char *, const char *);
@@ -1957,6 +1962,7 @@ struct config_include_data {
int depth;
config_fn_t fn;
void *data;
+ const struct config_options *opts;
};
#define CONFIG_INCLUDE_INIT { 0 }
extern int git_config_include(const char *name, const char *value, void *data);