]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fmt-merge-msg.c
config: pass kvi to die_bad_number()
[thirdparty/git.git] / fmt-merge-msg.c
index 5af0d4715ba22f2f1629880ec530a0752398e716..3ae59bde2f2912ba65f40aaeace8ec7052dcd66d 100644 (file)
@@ -20,11 +20,12 @@ static int use_branch_desc;
 static int suppress_dest_pattern_seen;
 static struct string_list suppress_dest_patterns = STRING_LIST_INIT_DUP;
 
-int fmt_merge_msg_config(const char *key, const char *value, void *cb)
+int fmt_merge_msg_config(const char *key, const char *value,
+                        const struct config_context *ctx, void *cb)
 {
        if (!strcmp(key, "merge.log") || !strcmp(key, "merge.summary")) {
                int is_bool;
-               merge_log_config = git_config_bool_or_int(key, value, &is_bool);
+               merge_log_config = git_config_bool_or_int(key, value, ctx->kvi, &is_bool);
                if (!is_bool && merge_log_config < 0)
                        return error("%s: negative length %s", key, value);
                if (is_bool && merge_log_config)
@@ -40,7 +41,7 @@ int fmt_merge_msg_config(const char *key, const char *value, void *cb)
                        string_list_append(&suppress_dest_patterns, value);
                suppress_dest_pattern_seen = 1;
        } else {
-               return git_default_config(key, value, cb);
+               return git_default_config(key, value, ctx, cb);
        }
        return 0;
 }