]> git.ipfire.org Git - thirdparty/git.git/commit
graph: add a 2 commit buffer for lookahead
authorPablo Sabater <pabloosabaterr@gmail.com>
Tue, 14 Jul 2026 12:09:34 +0000 (14:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Jul 2026 14:32:51 +0000 (07:32 -0700)
commitbf3c696b44eb82f90b25101e36cd79651d1480f8
tree9060704be7a5623f4f5004674f1547a2933e8fe8
parent08a0bef796e3a1de6b5d08d7958bc122faf32f15
graph: add a 2 commit buffer for lookahead

In a subsequent commit the graph renderer needs to know if the next
commit is a visual root or if it is the last commit to be shown. This
requires peeking 2 commits ahead.

Commits are pre-fetched in get_revision() through next_commit_to_show()
where they are also marked as SHOWN, regardless the source they come
from.

Update graph_is_interesting() so it considers commits inside the
lookahead buffer as interesting as well.

Helped-by: Kristofer Karlsson <krka@spotify.com>
Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
graph.c
graph.h
revision.c