]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.c
config: add ctx arg to config_fn_t
[thirdparty/git.git] / grep.c
diff --git a/grep.c b/grep.c
index f00986c451a99502a9dbe5bc1feeca6c486f0065..fc22c3e2afb0427892f8a1fb2f5ce79ee69d4d4b 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -56,7 +56,8 @@ define_list_config_array_extra(color_grep_slots, {"match"});
  * Read the configuration file once and store it in
  * the grep_defaults template.
  */
-int grep_config(const char *var, const char *value, void *cb)
+int grep_config(const char *var, const char *value,
+               const struct config_context *ctx, void *cb)
 {
        struct grep_opt *opt = cb;
        const char *slot;
@@ -91,9 +92,9 @@ int grep_config(const char *var, const char *value, void *cb)
        if (!strcmp(var, "color.grep"))
                opt->color = git_config_colorbool(var, value);
        if (!strcmp(var, "color.grep.match")) {
-               if (grep_config("color.grep.matchcontext", value, cb) < 0)
+               if (grep_config("color.grep.matchcontext", value, ctx, cb) < 0)
                        return -1;
-               if (grep_config("color.grep.matchselected", value, cb) < 0)
+               if (grep_config("color.grep.matchselected", value, ctx, cb) < 0)
                        return -1;
        } else if (skip_prefix(var, "color.grep.", &slot)) {
                int i = LOOKUP_CONFIG(color_grep_slots, slot);