]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/helper/test-config.c
config: pass kvi to die_bad_number()
[thirdparty/git.git] / t / helper / test-config.c
index 3f4c3678318e1762d87239b00c6d2d7ec2d94380..ed444ca4c25fbf2c581d5f950609c218b53a341c 100644 (file)
@@ -63,12 +63,12 @@ static int iterate_cb(const char *var, const char *value,
 }
 
 static int parse_int_cb(const char *var, const char *value,
-                       const struct config_context *ctx UNUSED, void *data)
+                       const struct config_context *ctx, void *data)
 {
        const char *key_to_match = data;
 
        if (!strcmp(key_to_match, var)) {
-               int parsed = git_config_int(value, value);
+               int parsed = git_config_int(value, value, ctx->kvi);
                printf("%d\n", parsed);
        }
        return 0;
@@ -182,7 +182,7 @@ int cmd__config(int argc, const char **argv)
                                goto exit2;
                        }
                }
-               if (!git_configset_get_value(&cs, argv[2], &v)) {
+               if (!git_configset_get_value(&cs, argv[2], &v, NULL)) {
                        if (!v)
                                printf("(NULL)\n");
                        else