diff options
author | 2020-06-02 13:35:01 -0700 | |
---|---|---|
committer | 2020-06-02 13:35:01 -0700 | |
commit | 0739479c6a2b02992037d7e816663d6782bfcd49 (patch) | |
tree | 544804f76037a2deeaa9520d4bbbef41225d13a0 /builtin | |
parent | Git 2.27 (diff) | |
parent | merge: optimization to skip evaluate_result for single strategy (diff) | |
download | tgif-0739479c6a2b02992037d7e816663d6782bfcd49.tar.xz |
Merge branch 'an/merge-single-strategy-optim'
Code optimization for a common case.
* an/merge-single-strategy-optim:
merge: optimization to skip evaluate_result for single strategy
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/merge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index ca6a5dc4bf..7da707bf55 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1656,7 +1656,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) } merge_was_ok = 1; } - cnt = evaluate_result(); + cnt = (use_strategies_nr > 1) ? evaluate_result() : 0; if (best_cnt <= 0 || cnt <= best_cnt) { best_strategy = use_strategies[i]->name; best_cnt = cnt; |