diff options
| author | Kristofer Karlsson <krka@spotify.com> | 2026-05-27 15:50:01 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-05-28 06:08:20 +0900 |
| commit | d877b1af507a6aaf55e8643eb73277a30d3a800b (patch) | |
| tree | 4f4e00e2972a80270c7e1e1f43f3d807cf573406 /commit.c | |
| parent | 9f4e170dfc3bd8cdd284f1c4411b25ce1d09737f (diff) | |
revision: introduce rev_walk_mode to clarify get_revision_1()
get_revision_1() dispatches to different walk strategies based on a
combination of rev_info flags: reflog_info, topo_walk_info, and
limited. These conditions are checked in multiple places within
the function -- once to select the next commit, and again to decide
how to expand parents -- and the two chains must stay in sync.
Extract the mode selection into a rev_walk_mode enum and a small
get_walk_mode() helper, resolved once at the top of get_revision_1().
Both dispatch sites now switch on the same mode variable, making it
obvious that they agree and easier to verify that all modes are
handled.
No functional change.
Signed-off-by: Kristofer Karlsson <krka@spotify.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions
