git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Johannes Sixt
Message 9 of 11 in “Add option to change order of parents in merge commit”
  1. 0/3 Add option to change order of parents in merge commitKacper Kornet, Nov 27, 2012
  2. 1/3 Process MERGE_MODE before MERGE_HEADKacper Kornet, Nov 27, 2012
  3. 2/3 Allow for MERGE_MODE to specify more then one modeKacper Kornet, Nov 27, 2012
  4. Junio C HamanoNov 28, 2012
  5. Kacper KornetNov 28, 2012
  6. Junio C HamanoNov 28, 2012
  7. 3/3 Add option to transpose parents of merge commitKacper Kornet, Nov 27, 2012
  8. Junio C HamanoNov 28, 2012
  9. Kacper KornetNov 28, 2012
  10. Johannes SixtNov 28, 2012
  11. Junio C HamanoNov 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.