aboutsummaryrefslogtreecommitdiffstats
path: root/commit.h
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2025-07-18 11:39:14 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-18 09:34:55 -0700
commite436bc94f318bfe393689e5243270f1951d90452 (patch)
tree554e537bad8bc449ba4a5bacbc030b39f7c65c63 /commit.h
parentcommit: use prio_queue_replace() in pop_most_recent_commit(),MIME-Version: 1.0 (diff)
downloadgit-e436bc94f318bfe393689e5243270f1951d90452.tar.gz
git-e436bc94f318bfe393689e5243270f1951d90452.zip
prio-queue: add prio_queue_replace()
Add a function to replace the top element of the queue that basically does the same as prio_queue_get() followed by prio_queue_put(), but without the work by prio_queue_get() to rebalance the heap. It can be used to optimize loops that get one element and then immediately add another one. That's common e.g., with commit history traversal, where we get out a commit and then put in its parents. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions