mirror of
https://github.com/git/git.git
synced 2026-08-05 07:31:02 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
1a2aca2be4
commit
ffd18fb3ae
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user