Re: [PATCH 2/2] commit: use a priority queue in merge base functions
On Wed, Aug 29, 2012 at 04:55:25PM -0400, Jeff King wrote:
Show 8 quoted lines
> On Wed, Aug 29, 2012 at 04:53:32PM -0400, Jeff King wrote:
>
> > > Thanks. This seems to break t6010-merge-base.sh for me, though...
> >
> > Interesting. It works fine here, even under --valgrind. Did you apply
> > the patches directly on top of 1251cc7?
>
> Hmm, this does seem to break t6024 for me, though.
Show 16 quoted lines
> /* Clean up the result to remove stale ones */
> - free_commit_list(list);
> - list = result; result = NULL;
> - while (list) {
> - struct commit_list *next = list->next;
> - if (!(list->item->object.flags & STALE))
> - commit_list_insert_by_date(list->item, &result);
> - free(list);
> - list = next;
> - }
> - return result;
> + while (result.nr)
> + commit_list_append(queue_pop(&result), &tail);
> + queue_clear(&result);
> + queue_clear(&list);
> + return ret;I forgot to to port the STALE flag handling here.
-Peff