]> git.ipfire.org Git - thirdparty/git.git/blobdiff - help.c
config: pass kvi to die_bad_number()
[thirdparty/git.git] / help.c
diff --git a/help.c b/help.c
index 5d7637dce92867c1c0bee7f6f6b904852d237222..389382b1482981871eabcab168cc879838b6d05a 100644 (file)
--- a/help.c
+++ b/help.c
@@ -309,7 +309,8 @@ void load_command_list(const char *prefix,
        exclude_cmds(other_cmds, main_cmds);
 }
 
-static int get_colopts(const char *var, const char *value, void *data)
+static int get_colopts(const char *var, const char *value,
+                      const struct config_context *ctx UNUSED, void *data)
 {
        unsigned int *colopts = data;
 
@@ -459,7 +460,8 @@ void list_developer_interfaces_help(void)
        putchar('\n');
 }
 
-static int get_alias(const char *var, const char *value, void *data)
+static int get_alias(const char *var, const char *value,
+                    const struct config_context *ctx UNUSED, void *data)
 {
        struct string_list *list = data;
 
@@ -543,6 +545,7 @@ static struct cmdnames aliases;
 #define AUTOCORRECT_IMMEDIATELY (-1)
 
 static int git_unknown_cmd_config(const char *var, const char *value,
+                                 const struct config_context *ctx,
                                  void *cb UNUSED)
 {
        const char *p;
@@ -557,7 +560,7 @@ static int git_unknown_cmd_config(const char *var, const char *value,
                } else if (!strcmp(value, "prompt")) {
                        autocorrect = AUTOCORRECT_PROMPT;
                } else {
-                       int v = git_config_int(var, value);
+                       int v = git_config_int(var, value, ctx->kvi);
                        autocorrect = (v < 0)
                                ? AUTOCORRECT_IMMEDIATELY : v;
                }