summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorKristofer Karlsson <krka@spotify.com>2026-05-25 14:28:04 +0000
committerJunio C Hamano <gitster@pobox.com>2026-05-26 07:17:26 +0900
commitf767dae3e6c8359128d0ec83acd009751e92e419 (patch)
tree7f6b2172a2b24facb80cb851675c6b8db075abaa /t/t4013/diff.diff_initial..side
parent85a30b5b26c2953aa836c554af5fc58eed707e4a (diff)
commit-reach: deduplicate queue entries in paint_down_to_common
paint_down_to_common() can enqueue the same commit multiple times when it is reached through different parents with different flag combinations. Add an ENQUEUED flag to track whether a commit is currently in the priority queue, and skip it if already present. Introduce prio_queue_put_dedup() and prio_queue_get_dedup() wrappers that manage the ENQUEUED flag on enqueue and dequeue. This change is performance-neutral on its own: the O(n) queue_has_nonstale() scan still dominates the per-iteration cost. However, the deduplication guarantee (each commit appears in the queue at most once) is a prerequisite for the next commit, which replaces that scan with O(1) tracking. Signed-off-by: Kristofer Karlsson <krka@spotify.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