summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e467193)
raw | patch | inline | side by side (parent: e467193)
author | Jeff King <peff@peff.net> | |
Fri, 4 Jan 2008 09:45:31 +0000 (04:45 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 5 Jan 2008 00:22:07 +0000 (16:22 -0800) |
There is no point to this. Either:
1. The program has already loaded git_diff_ui_config, in
which case this is a noop.
2. The program didn't, which means it is plumbing that
does not _want_ git_diff_ui_config to be loaded.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1. The program has already loaded git_diff_ui_config, in
which case this is a noop.
2. The program didn't, which means it is plumbing that
does not _want_ git_diff_ui_config to be loaded.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history |
index 4a908b28af90e02e4eca8319c1ac51bb788a27c1..2c78d74a427aa04aba1403661c899083488e46f2 100644 (file)
--- a/diff.c
+++ b/diff.c
char *cmd;
} *user_diff, **user_diff_tail;
-static void read_config_if_needed(void)
-{
- if (!user_diff_tail) {
- user_diff_tail = &user_diff;
- git_config(git_diff_ui_config);
- }
-}
-
/*
* Currently there is only "diff.<drivername>.command" variable;
* because there are "diff.color.<slot>" variables, we are parsing
!ATTR_UNSET(value)) {
struct ll_diff_driver *drv;
- read_config_if_needed();
for (drv = user_diff; drv; drv = drv->next)
if (!strcmp(drv->name, value))
return drv->cmd;