From: Daniel Barkalow Date: Sun, 24 Apr 2005 02:40:40 GMT Subject: Re: [PATCH 1/5] Add some functions for commit lists Message-ID: In-Reply-To: On Sat, 23 Apr 2005, Linus Torvalds wrote: > > > 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*