Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2009-11-26 05:23:54 +0300
committerJunio C Hamano <gitster@pobox.com>2009-11-30 05:49:11 +0300
commited87465658c83a5a1617920e7b605bd830a78aed (patch)
treedab8c5958dc5075182409f9385def978b7968b2b /builtin-merge.c
parent78d553b7d7b269bb22ebd8b1198657c37484a3a0 (diff)
builtin-merge.c: call exclude_cmds() correctly.
We need to call exclude_cmds() after the loop, not during the loop, because excluding a command from the array can change the indexes of objects in the array. The result is that, depending on file ordering, some commands weren't excluded as they should have been. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge.c')
-rw-r--r--builtin-merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index b6b84286b2..4bcf7c7bce 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -106,8 +106,8 @@ static struct strategy *get_strategy(const char *name)
found = 1;
if (!found)
add_cmdname(&not_strategies, ent->name, ent->len);
- exclude_cmds(&main_cmds, &not_strategies);
}
+ exclude_cmds(&main_cmds, &not_strategies);
}
if (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {
fprintf(stderr, "Could not find merge strategy '%s'.\n", name);