Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-02-27 21:08:56 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-27 21:08:56 +0300
commitece8dc97ae53d08247aa283b6f299e3e5b2669db (patch)
tree3af9afced2453f047c1e45f9d9e4639e89dec0d9 /userdiff.c
parent21522cf5d0a719ceb7c4b935294be7737062763a (diff)
parenta4cf900ee734ce9bb73d57c5dfbb1da4a5a88bd3 (diff)
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.c4
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;
}