diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2017-04-17 17:10:00 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-17 19:18:40 -0700 |
commit | c48f4b379eb3a0d093f5a87cce1d2ed6c175104f (patch) | |
tree | 1d2ed277b359a1026b12d0bc9ad08d6aab0ca21a /cache.h | |
parent | 584f8975d2d9530a34bd0b936ae774f82fe30fed (diff) | |
download | git-c48f4b379eb3a0d093f5a87cce1d2ed6c175104f.tar.gz |
config: prepare to pass more info in git_config_with_options()
So far we can only pass one flag, respect_includes, to thie function. We
need to pass some more (non-flag even), so let's make it accept a struct
instead of an integer.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1885,6 +1885,10 @@ enum config_origin_type { CONFIG_ORIGIN_CMDLINE }; +struct config_options { + unsigned int respect_includes : 1; +}; + 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 *); @@ -1898,7 +1902,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 *); @@ -1950,6 +1954,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); |