Re: [PATCH v2 3/3] Add option to transpose parents of merge commit
- From
Kacper Kornet <draenog@pld-linux.org>
- Date
- Nov 28, 2012, 04:43 UTC
- Message-ID
- <20121128044354.GB17470@camk.edu.pl>
- In-Reply-To
- <7vzk22ii7b.fsf@alter.siamese.dyndns.org>
On Tue, Nov 27, 2012 at 06:18:00PM -0800, Junio C Hamano wrote:
> Kacper Kornet <draenog@pld-linux.org> writes:
Show 6 quoted lines
> > +--transpose-parents:: > > + Transpose the parents in the final commit. The change is made > > + just before the commit so the meaning of 'our' and 'their' > > + concepts remains the same (i.e. 'our' means current branch before > > + the merge). > > +
> How does this interact with Octopus merges?
It moves the original first parent to the last position. And nothing more. I have forgotten to mention it in the documentation.
Show 9 quoted lines
> > diff --git a/builtin/commit.c b/builtin/commit.c
> > index ee0e884..ab2b844 100644
> > --- a/builtin/commit.c
> > +++ b/builtin/commit.c
> > @@ -1477,6 +1477,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
> > } else if (whence == FROM_MERGE) {
> > struct strbuf m = STRBUF_INIT;
> > FILE *fp;
> > + int reversed_order=0;> Style. s/=/ = /;
> > + OPT_BOOLEAN(0, "transpose-parents", &reversed_order, N_("reverse order of parents")> It smells more like "--reverse-parents" (if you deal only with > two-head merges), no?
I have changes to --transpose-parents because of the octopus merges. Although it is not a mathematical transposition in this case, but a cycle permutation.
-- Kacper