aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-01-04 04:45:31 -0500
committerJunio C Hamano <gitster@pobox.com>2008-01-04 16:22:07 -0800
commitcae6c25a7fdd7a316318c2efdc48e63cce36a68c (patch)
treed133a436dc0fd3d6b8e657d3b67af566f8e3d63c /diff.c
parente467193ff3f57171c5c3232b4ba3595970efbfb5 (diff)
downloadgit-cae6c25a7fdd7a316318c2efdc48e63cce36a68c.tar.gz
git-cae6c25a7fdd7a316318c2efdc48e63cce36a68c.tar.xz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c9
1 files changed, 0 insertions, 9 deletions
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.<drivername>.command" variable;
* because there are "diff.color.<slot>" 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;