Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-11 Thread Jeff King
On Mon, Jun 10, 2013 at 04:23:31PM -0700, Junio C Hamano wrote: OK, I pushed out a result of some renaming and rebasing. Notable changes are: - The data and API is called prio-queue and they live in prio-queue.[ch]; - The test script is also named test-prio-queue.c, to leave the

Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: It may be worth looking again for other places to use this over commit_list, but even the caller you are introducing here justifies its presence. The next candidate is paint-down-to-common, probably. Also, I wrote some basic tests to cover the priority queue

Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-10 Thread Jeff King
On Mon, Jun 10, 2013 at 12:21:00AM -0700, Junio C Hamano wrote: It may be worth looking again for other places to use this over commit_list, but even the caller you are introducing here justifies its presence. The next candidate is paint-down-to-common, probably. Yeah, I don't think I

Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Jun 10, 2013 at 12:21:00AM -0700, Junio C Hamano wrote: It may be worth looking again for other places to use this over commit_list, but even the caller you are introducing here justifies its presence. The next candidate is paint-down-to-common,

Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-10 Thread Jeff King
On Mon, Jun 10, 2013 at 11:56:33AM -0700, Junio C Hamano wrote: or similar. I didn't change the name, either. It may be silly to call it commit_queue still since it is now more general. I simply called mine queue (I wanted pqueue, but that conflicted with globals defined by OpenSSL; yours

Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Jun 10, 2013 at 11:56:33AM -0700, Junio C Hamano wrote: or similar. I didn't change the name, either. It may be silly to call it commit_queue still since it is now more general. I simply called mine queue (I wanted pqueue, but that conflicted with

[PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-09 Thread Junio C Hamano
Traditionally we used a singly linked list of commits to hold a set of in-flight commits while traversing history. The most typical use of the list is to add commits that are newly discovered to it, keep the list sorted by commit timestamp, pick up the newest one from the list, and keep digging.

Re: [PATCH v2 2/4] commit-queue: LIFO or priority queue of commits

2013-06-09 Thread Jeff King
On Sun, Jun 09, 2013 at 04:24:35PM -0700, Junio C Hamano wrote: Traditionally we used a singly linked list of commits to hold a set of in-flight commits while traversing history. The most typical use of the list is to add commits that are newly discovered to it, keep the list sorted by