зеркало из https://github.com/microsoft/git.git
Merge branch 'sk/merge-filtering-strategies-micro-optim'
Micro optimization. * sk/merge-filtering-strategies-micro-optim: merge: break out of all_strategy loop when strategy is found
This commit is contained in:
Коммит
df786f6efe
|
@ -188,7 +188,7 @@ static struct strategy *get_strategy(const char *name)
|
|||
for (i = 0; i < main_cmds.cnt; i++) {
|
||||
int j, found = 0;
|
||||
struct cmdname *ent = main_cmds.names[i];
|
||||
for (j = 0; j < ARRAY_SIZE(all_strategy); j++)
|
||||
for (j = 0; !found && j < ARRAY_SIZE(all_strategy); j++)
|
||||
if (!strncmp(ent->name, all_strategy[j].name, ent->len)
|
||||
&& !all_strategy[j].name[ent->len])
|
||||
found = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче