From da24b1044f7dc85cda52d6423f5a794a7074fbf8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 6 Jun 2013 21:58:12 -0700 Subject: sort-in-topological-order: use prio-queue Use the prio-queue data structure to implement a priority queue of commits sorted by committer date, when handling --date-order. The structure can also be used as a simple LIFO stack, which is a good match for --topo-order processing. Signed-off-by: Junio C Hamano --- prio-queue.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prio-queue.h') diff --git a/prio-queue.h b/prio-queue.h index c766abec3d..9c3cd1f875 100644 --- a/prio-queue.h +++ b/prio-queue.h @@ -42,4 +42,7 @@ extern void *prio_queue_get(struct prio_queue *); extern void clear_prio_queue(struct prio_queue *); +/* Reverse the LIFO elements */ +extern void prio_queue_reverse(struct prio_queue *); + #endif /* PRIO_QUEUE_H */ -- cgit v1.2.1