Re: [PATCH 1/5] Add some functions for commit lists
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Apr 24, 2005, 02:40 UTC
- Message-ID
- <Pine.LNX.4.21.0504232230080.30848-100000@iabervon.org>
- In-Reply-To
- <Pine.LNX.4.58.0504231916300.2344@ppc970.osdl.org>
On Sat, 23 Apr 2005, Linus Torvalds wrote:
Show 12 quoted lines
> > > On Sat, 23 Apr 2005, Linus Torvalds wrote: > > > > Ok. This is more in like with what I was hoping for, looks good. > > Oh, Daniel, I notice that you have the same old bug: it will happily add > the same parent to the list several times. You need to prune them out, and > ignore things you've seen. > > I pushed out the fix (don't parse and add parents to the list that were > already parsed).
This won't actually work for merge-base, which wants to run two of these, one for each head, in parallel, and find the first commit on both lists. I think making insert_by_date() ignore items already in the list is a better solution, although that might run into problems if there's a complicated graph of commits all with the same time.
Another option is to specify a object.flags bit to mark for each commit and ignore commits that are already marked.
-Daniel *This .sig left intentionally blank*