userdiff: add diff.<driver>.process config
Add the process field to struct userdiff_driver and teach the config parser to populate it from diff.<driver>.process. The field names a long-running hunk provider process. Nothing reads it yet: the consult, the protocol, and the documentation arrive with the next commit, which starts and pools processes keyed by this field's command string. Signed-off-by: Michael Montalbo <mmontalbo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Montalbo committed
Aug 1, 2026 at 10:41 UTC
ffd18fb3ae7ed5010dc6dc9d1f2ad54f2bcb6a39
2 files changed
+9
userdiff.c
+7
@@ -509,6 +509,13 @@ int userdiff_config(const char *k, const char *v)
509
drv->algorithm = drv->algorithm_owned;
510
return ret;
511
}
512
+ if (!strcmp(type, "process")) {
513
+ int ret;
514
+ FREE_AND_NULL(drv->process_owned);
515
+ ret = git_config_string(&drv->process_owned, k, v);
516
+ drv->process = drv->process_owned;
517
+ return ret;
518
+ }
519
520
return 0;
521
}
userdiff.h
+2
@@ -31,6 +31,8 @@ struct userdiff_driver {
31
char *textconv_owned;
32
struct notes_cache *textconv_cache;
33
int textconv_want_cache;
34
+ const char *process;
35
+ char *process_owned;
36
};
37
enum userdiff_driver_type {
38
USERDIFF_DRIVER_TYPE_BUILTIN = 1<<0,