diff options
| author | yorah <yoram.harmelin@gmail.com> | 2012-09-10 12:11:02 +0200 |
|---|---|---|
| committer | yorah <yoram.harmelin@gmail.com> | 2012-10-23 12:48:38 +0200 |
| commit | a1abe66aca3625eec1cabb2e93cf8df0be1b63f0 (patch) | |
| tree | 17de8c31afbdb3398a391e1fcede5010394dec85 /tests-clar/config/multivar.c | |
| parent | f8ede94808348ac12db1d5dd91e5f66624d8b40d (diff) | |
| download | libgit2-a1abe66aca3625eec1cabb2e93cf8df0be1b63f0.tar.gz | |
Add config level support in the config API
Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found.
Added `git_config_open_level`: build a single-level focused config object from a multi-level one.
We are now storing `git_config_entry`s in the khash of the config_file
Diffstat (limited to 'tests-clar/config/multivar.c')
| -rw-r--r-- | tests-clar/config/multivar.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests-clar/config/multivar.c b/tests-clar/config/multivar.c index 3b40cd09a..26537e20a 100644 --- a/tests-clar/config/multivar.c +++ b/tests-clar/config/multivar.c @@ -12,13 +12,11 @@ void test_config_multivar__cleanup(void) cl_fixture_cleanup("config"); } -static int mv_read_cb(const char *name, const char *value, void *data) +static int mv_read_cb(const git_config_entry *entry, void *data) { int *n = (int *) data; - GIT_UNUSED(value); - - if (!strcmp(name, _name)) + if (!strcmp(entry->name, _name)) (*n)++; return 0; @@ -37,11 +35,11 @@ void test_config_multivar__foreach(void) git_config_free(cfg); } -static int cb(const char *val, void *data) +static int cb(const git_config_entry *entry, void *data) { int *n = (int *) data; - GIT_UNUSED(val); + GIT_UNUSED(entry); (*n)++; |
