From: Kacper Kornet <draenog@pld-linux.org>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [RFC/PATCH] Option to revert order of parents in merge commit
Date: Mon, 26 Nov 2012 13:42:01 +0100 [thread overview]
Message-ID: <20121126124200.GA29859@camk.edu.pl> (raw)
In-Reply-To: <7vfw3zzoye.fsf@alter.siamese.dyndns.org>
On Fri, Nov 23, 2012 at 06:58:49PM -0800, Junio C Hamano wrote:
> 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.
You are right. Probably transpose is the best description what the patch
really does.
> 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.
Our developers work mainly on master branches. The project consists of
many thousands independent git repositories, and at the given time a
developer usually wants to make only one commit in the given repository
and push his changes upstream. So he usually doesn't care to make a
branch. Then after failed pushed, one needs to add creation and removal
of temporary branch (see the commit message of the suggested patch).
The possibility to do git pull --reverse-parent would make the life
easier in this case.
> 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?
The change of order of parents happens at the very last moment, so
"ours" in merge options is local version and "theirs" upstream.
--
Kacper Kornet
next prev parent reply other threads:[~2012-11-26 12:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 8:35 [RFC/PATCH] Option to revert order of parents in merge commit Kacper Kornet
2012-11-24 2:58 ` Junio C Hamano
2012-11-26 12:42 ` Kacper Kornet [this message]
2012-11-26 17:58 ` Junio C Hamano
2012-11-26 23:24 ` Aaron Schrab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121126124200.GA29859@camk.edu.pl \
--to=draenog@pld-linux.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).