diff options
| author | Elijah Newren <newren@gmail.com> | 2022-08-23 02:42:21 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-08-24 09:25:59 -0700 |
| commit | ae15fd4116212d8f2168e321594ee3acc2f50a5f (patch) | |
| tree | 8a0a82e4edb3983bc106887a22160c3ee021a17b /commit-graph.c | |
| parent | merge: cleanup confusing logic for handling successful merges (diff) | |
| download | git-ae15fd4116212d8f2168e321594ee3acc2f50a5f.tar.gz git-ae15fd4116212d8f2168e321594ee3acc2f50a5f.zip | |
merge: small code readability improvement
After our loop through the selected strategies, we compare best_strategy
to wt_strategy. This is fine, but the fact that the code setting
best_strategy sets it to use_strategies[i]->name requires a little bit
of extra checking to determine that at the time of setting, that's the
same as wt_strategy. Just setting best_strategy to wt_strategy makes it
a little easier to verify what the loop is doing, at least for this
reader.
Further, use_strategies[i]->name is used in a number of places, where we
could just use wt_strategy. The latter takes less time for this reader
to parse (one variable name instead of three), so just use wt_strategy
to make the code slightly faster for human readers to parse.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions
