summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c2
-rw-r--r--src/config_file.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index cc31bda6d..a2202d79b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -151,7 +151,7 @@ int git_config_add_file(git_config *cfg, git_config_file *file, int priority)
* Loop over all the variables
*/
-int git_config_foreach(git_config *cfg, int (*fn)(const char *, void *), void *data)
+int git_config_foreach(git_config *cfg, int (*fn)(const char *, const char *, void *), void *data)
{
int ret = GIT_SUCCESS;
unsigned int i;
diff --git a/src/config_file.c b/src/config_file.c
index 2966f11bd..b01778739 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -310,7 +310,7 @@ static void backend_free(git_config_file *_backend)
free(backend);
}
-static int file_foreach(git_config_file *backend, int (*fn)(const char *, void *), void *data)
+static int file_foreach(git_config_file *backend, int (*fn)(const char *, const char *, void *), void *data)
{
int ret = GIT_SUCCESS;
cvar_t *var;
@@ -323,7 +323,7 @@ static int file_foreach(git_config_file *backend, int (*fn)(const char *, void *
if (ret < GIT_SUCCESS)
return ret;
- ret = fn(normalized, data);
+ ret = fn(normalized, var->value, data);
free(normalized);
if (ret)
break;