From: Jeff King Date: Fri, 4 Jan 2008 09:45:31 +0000 (-0500) Subject: diff: remove lazy config loading X-Git-Tag: v1.5.4-rc3~51 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cae6c25a7fdd7a316318c2efdc48e63cce36a68c;p=git.git diff: remove lazy config loading 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 Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 4a908b28a..2c78d74a4 100644 --- a/diff.c +++ b/diff.c @@ -59,14 +59,6 @@ static struct ll_diff_driver { 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..command" variable; * because there are "diff.color." variables, we are parsing @@ -1822,7 +1814,6 @@ static const char *external_diff_attr(const char *name) !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;