]> git.ipfire.org Git - thirdparty/git.git/commitdiff
userdiff: add diff.<driver>.process config
authorMichael Montalbo <mmontalbo@gmail.com>
Sun, 26 Jul 2026 18:51:22 +0000 (18:51 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 26 Jul 2026 21:03:54 +0000 (14:03 -0700)
Add the process field to struct userdiff_driver and teach the
config parser to populate it from diff.<driver>.process.

Signed-off-by: Michael Montalbo <mmontalbo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
userdiff.c
userdiff.h

index b5412e6bc3ecd390d71a31e4d884d66d2af6c910..7547874aa2569d19eb1a5ab69909ee7a54596714 100644 (file)
@@ -509,6 +509,13 @@ int userdiff_config(const char *k, const char *v)
                drv->algorithm = drv->algorithm_owned;
                return ret;
        }
+       if (!strcmp(type, "process")) {
+               int ret;
+               FREE_AND_NULL(drv->process_owned);
+               ret = git_config_string(&drv->process_owned, k, v);
+               drv->process = drv->process_owned;
+               return ret;
+       }
 
        return 0;
 }
index 827361b0bc9569426ba35d5b47b066464d1b7b92..51c26e0d4190e59bd9f34ef09ad1b3f9ffbf3045 100644 (file)
@@ -31,6 +31,8 @@ struct userdiff_driver {
        char *textconv_owned;
        struct notes_cache *textconv_cache;
        int textconv_want_cache;
+       const char *process;
+       char *process_owned;
 };
 enum userdiff_driver_type {
        USERDIFF_DRIVER_TYPE_BUILTIN = 1<<0,