Skip to content

Commit cae6c25

Browse files
peffgitster
authored andcommitted
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>
1 parent e467193 commit cae6c25

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

diff.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ static struct ll_diff_driver {
5959
char *cmd;
6060
} *user_diff, **user_diff_tail;
6161

62-
static void read_config_if_needed(void)
63-
{
64-
if (!user_diff_tail) {
65-
user_diff_tail = &user_diff;
66-
git_config(git_diff_ui_config);
67-
}
68-
}
69-
7062
/*
7163
* Currently there is only "diff.<drivername>.command" variable;
7264
* because there are "diff.color.<slot>" variables, we are parsing
@@ -1822,7 +1814,6 @@ static const char *external_diff_attr(const char *name)
18221814
!ATTR_UNSET(value)) {
18231815
struct ll_diff_driver *drv;
18241816

1825-
read_config_if_needed();
18261817
for (drv = user_diff; drv; drv = drv->next)
18271818
if (!strcmp(drv->name, value))
18281819
return drv->cmd;

0 commit comments

Comments
 (0)