Re: [PATCH 09/10] Introduce get_octopus_merge_bases() in commit.c
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 6, 2008, 12:36 UTC
- Message-ID
- <alpine.DEB.1.00.0806061331560.1783@racer>
- In-Reply-To
- <alpine.DEB.1.00.0806061316350.1783@racer>
Hi,
On Fri, 6 Jun 2008, Johannes Schindelin wrote:
Show 13 quoted lines
> > one->object.flags |= PARENT1;
> > - two->object.flags |= PARENT2;
> > insert_by_date(one, &list);
> > - insert_by_date(two, &list);
> > + for (i = 0; i < n; i++) {
> > + twos[i]->object.flags |= PARENT2;
> > + insert_by_date(twos[i], &list);
> > + }
>
> Ah, now that is clever: I thought we would get into a lot of problems
> because we would need a bit for every initial commit. But what you are
> basically doing is reusing PARENT2 for all the merge bases that have
> been found for the heads up to, but not including, the current one.I spoke too soon. This is not going to work easily: after doing this for two heads, the PARENT1 flag must be reset to PARENT2 before traversing for a third head.
Or am I missing something obvious?
Ciao, Dscho