summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorPablo Sabater <pabloosabaterr@gmail.com>2026-07-14 14:09:33 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-14 07:32:51 -0700
commit08a0bef796e3a1de6b5d08d7958bc122faf32f15 (patch)
tree7e471da272cbfdaba6f59be97a83c6e4eea84ac8 /t/t4013/diff.diff_initial..side
parent641588bbcd1e80e084881d547e10aca8b32c328e (diff)
revision: add next_commit_to_show()
get_revision() gets its commits from two sources depending on the mode: 1. Normally it gets the commits from get_revision_internal(). 2. --max-count-oldest which was introduced at bb4ce23284 (revision.c: implement --max-count-oldest, 2026-05-19) gets the commits by popping from a saved list at revs->commits marking SHOWN and CHILD_SHOWN on each popped commit. Extract the choice logic into a helper, next_commit_to_show(), which returns the next commit regardless of the source it comes from. This has no change in behavior. The helper is needed in a subsequent commit that pre-fetches two commits into a buffer for lookahead purposes and needs to pre-fetch from the same source. The --reverse branch keeps its own pop loop. Using the helper for --reverse would additionally set SHOWN and CHILD_SHOWN which is not desired and a behavior change. Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions