summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2014-02-18 22:58:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-19 00:12:13 (GMT)
commitc8985ce05360857733738561dd6cdf964470cbdf (patch)
tree3435c93484d5e89639c41d2e9a101282f4ab71be /cache.h
parent6aea9f0fdd2f013e9b63137727c73da02d42a1be (diff)
downloadgit-c8985ce05360857733738561dd6cdf964470cbdf.zip
git-c8985ce05360857733738561dd6cdf964470cbdf.tar.gz
git-c8985ce05360857733738561dd6cdf964470cbdf.tar.bz2
config: change git_config_with_options() interface
We're going to have more options for config source. Let's alter git_config_with_options() interface to accept struct with all source options. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index dc040fb..9d94bd6 100644
--- a/cache.h
+++ b/cache.h
@@ -1146,6 +1146,11 @@ extern int update_server_info(int);
#define CONFIG_INVALID_PATTERN 6
#define CONFIG_GENERIC_ERROR 7
+struct git_config_source {
+ const char *file;
+ const char *blob;
+};
+
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 *);
@@ -1155,8 +1160,7 @@ extern void git_config_push_parameter(const char *text);
extern int git_config_from_parameters(config_fn_t fn, void *data);
extern int git_config(config_fn_t fn, void *);
extern int git_config_with_options(config_fn_t fn, void *,
- const char *filename,
- const char *blob_ref,
+ struct git_config_source *config_source,
int respect_includes);
extern int git_config_early(config_fn_t fn, void *, const char *repo_config);
extern int git_parse_ulong(const char *, unsigned long *);