diff --git a/builtin-merge.c b/builtin-merge.c
index d6bcbec705fe5a2d278cba9cafd56415127d5afc..9ad9791068c9330f28413ac67315246989c8d96d 100644 (file)
--- a/builtin-merge.c
+++ b/builtin-merge.c
int i;
struct strategy *ret;
static struct cmdnames main_cmds, other_cmds;
- static int longest;
+ static int loaded;
if (!name)
return NULL;
if (!strcmp(name, all_strategy[i].name))
return &all_strategy[i];
- if (!longest) {
+ if (!loaded) {
struct cmdnames not_strategies;
+ loaded = 1;
- memset(&main_cmds, 0, sizeof(struct cmdnames));
- memset(&other_cmds, 0, sizeof(struct cmdnames));
memset(¬_strategies, 0, sizeof(struct cmdnames));
- longest = load_command_list("git-merge-", &main_cmds,
- &other_cmds);
+ load_command_list("git-merge-", &main_cmds, &other_cmds);
for (i = 0; i < main_cmds.cnt; i++) {
int j, found = 0;
struct cmdname *ent = main_cmds.names[i];