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 <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2013-06-06 21:58:12 -07:00
parent b4b594a315
commit da24b1044f
3 changed files with 60 additions and 31 deletions

View File

@@ -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 */