From: Michael Montalbo Date: Sun, 26 Jul 2026 18:51:22 +0000 (+0000) Subject: userdiff: add diff..process config X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7af1e8f2c57a7e2f9ee30b59496f0ef8ff6a3c3;p=thirdparty%2Fgit.git userdiff: add diff..process config Add the process field to struct userdiff_driver and teach the config parser to populate it from diff..process. Signed-off-by: Michael Montalbo Signed-off-by: Junio C Hamano --- diff --git a/userdiff.c b/userdiff.c index b5412e6bc3..7547874aa2 100644 --- a/userdiff.c +++ b/userdiff.c @@ -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; } diff --git a/userdiff.h b/userdiff.h index 827361b0bc..51c26e0d41 100644 --- a/userdiff.h +++ b/userdiff.h @@ -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,