diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-27 19:08:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-27 19:08:56 +0100 |
commit | ece8dc97ae53d08247aa283b6f299e3e5b2669db (patch) | |
tree | 3af9afced2453f047c1e45f9d9e4639e89dec0d9 /userdiff.c | |
parent | Merge branch 'pw/rebase-i-validate-labels-early' (diff) | |
parent | diff: teach diff to read algorithm from diff driver (diff) | |
download | git-ece8dc97ae53d08247aa283b6f299e3e5b2669db.tar.xz git-ece8dc97ae53d08247aa283b6f299e3e5b2669db.zip |
Merge branch 'jc/diff-algo-attribute'
The "diff" drivers specified by the "diff" attribute attached to
paths can now specify which algorithm (e.g. histogram) to use.
* jc/diff-algo-attribute:
diff: teach diff to read algorithm from diff driver
diff: consolidate diff algorithm option parsing
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c index 94cca1a2a8..58a3d59ef8 100644 --- a/userdiff.c +++ b/userdiff.c @@ -293,7 +293,7 @@ PATTERNS("scheme", "|([^][)(}{[ \t])+"), PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$", "\\\\[a-zA-Z@]+|\\\\.|[a-zA-Z0-9\x80-\xff]+"), -{ "default", NULL, -1, { NULL, 0 } }, +{ "default", NULL, NULL, -1, { NULL, 0 } }, }; #undef PATTERNS #undef IPATTERN @@ -394,6 +394,8 @@ int userdiff_config(const char *k, const char *v) return parse_bool(&drv->textconv_want_cache, k, v); if (!strcmp(type, "wordregex")) return git_config_string(&drv->word_regex, k, v); + if (!strcmp(type, "algorithm")) + return git_config_string(&drv->algorithm, k, v); return 0; } |