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

Re: [RFC/PATCH] Option to revert order of parents in merge commit

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 24, 2012, 02:58 UTC
Message-ID
<7vfw3zzoye.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121123083550.GA702@camk.edu.pl>
Kacper Kornet <draenog@pld-linux.org> writes:
> The following patch is an attempt to implement this idea.

I think "revert" is a wrong word (implying you have already done something and you are trying to defeat the effect of that old something), and you meant to say "reverse" (i.e. the opposite of normal) or something.

I am unsure about the usefulness of this, though.

After completing a topic on branch A, you would merge it to your own copy of the integration branch (e.g. 'master') and try to push, which may be rejected due to non-fast-forwardness:

    $ git checkout master
    $ git merge A
    $ git push

At that point, if you _care_ about the merge parent order, you could do this (still on 'master'):

    $ git fetch origin
    $ git reset --hard origin/master
    $ git merge A
    $ test test test
    $ git push
With --reverse-parents, it would become:
    $ git pull --reverse-parents
    $ test test test
    $ git push

which certainly is shorter and looks simpler. The workflow however would encourage people to work directly on the master branch, which is a bit of downside.

Is there any interaction between this "pull --reverse-parents" change and possible conflict resolution when the command stops and asks the user for help? For example, whom should "--ours" and "-X ours" refer to? Us, or the upstream?

Previous: Kacper KornetNext: Kacper Kornet
Message 2 of 5 in “Option to revert order of parents in merge commit”
  1. Option to revert order of parents in merge commitKacper Kornet, Nov 23, 2012
  2. Junio C HamanoNov 24, 2012
  3. Kacper KornetNov 26, 2012
  4. Junio C HamanoNov 26, 2012
  5. Aaron SchrabNov 26, 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.