From: Johannes Schindelin Date: Fri, 06 Jun 2008 12:36:14 GMT Subject: Re: [PATCH 09/10] Introduce get_octopus_merge_bases() in commit.c Message-ID: In-Reply-To: Hi, On Fri, 6 Jun 2008, Johannes Schindelin wrote: > > 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