summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a1805a)
raw | patch | inline | side by side (parent: 9a1805a)
author | Jeff King <peff@peff.net> | |
Fri, 4 Jan 2008 09:16:14 +0000 (04:16 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 5 Jan 2008 00:22:01 +0000 (16:22 -0800) |
The funcname patterns influence the "comment" on @@ lines of
the diff. They are safe to use with plumbing since they
don't fundamentally change the meaning of the diff in any
way.
Since all diff users call either diff_ui_config or
diff_basic_config, we can get rid of the lazy reading of the
config.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the diff. They are safe to use with plumbing since they
don't fundamentally change the meaning of the diff in any
way.
Since all diff users call either diff_ui_config or
diff_basic_config, we can get rid of the lazy reading of the
config.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history |
index 44aa477c41e2d6b68e43d3c74a7996bf21a630a9..4a908b28af90e02e4eca8319c1ac51bb788a27c1 100644 (file)
--- a/diff.c
+++ b/diff.c
if (ep != var + 4) {
if (!strcmp(ep, ".command"))
return parse_lldiff_command(var, ep, value);
- if (!strcmp(ep, ".funcname"))
- return parse_funcname_pattern(var, ep, value);
}
}
return 0;
}
+ if (!prefixcmp(var, "diff.")) {
+ const char *ep = strrchr(var, '.');
+ if (ep != var + 4) {
+ if (!strcmp(ep, ".funcname"))
+ return parse_funcname_pattern(var, ep, value);
+ }
+ }
+
return git_default_config(var, value);
}
{
struct funcname_pattern *pp;
- read_config_if_needed();
for (pp = funcname_pattern_list; pp; pp = pp->next)
if (!strcmp(ident, pp->name))
return pp->pattern;