git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Kacper Kornet <draenog@pld-linux.org>,
	git@vger.kernel.org, Aaron Schrab <aaron@schrab.com>
Subject: Re: [PATCH v2 3/3] Add option to transpose parents of merge commit
Date: Wed, 28 Nov 2012 08:52:52 -0800	[thread overview]
Message-ID: <7vr4ndhdp7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <50B5B599.3020105@viscovery.net> (Johannes Sixt's message of "Wed, 28 Nov 2012 07:56:25 +0100")

Johannes Sixt <j.sixt@viscovery.net> writes:

> Am 11/28/2012 0:00, schrieb Kacper Kornet:
>> When the changes are pushed upstream, and in the meantime someone else
>> updated upstream branch git advises to use git pull. This results in
>> history:
>> 
>>      ---A---B---C--
>>          \     /
>>           D---E
>
> The commit message will say:
>
>   Merge branch 'master' of /that/remote
>
>   * 'master' of /that/remote:
>     E
>     D
>
>> where B is the local commit. D, E are commits pushed by someone else
>> when the developer was working on B. However sometimes the following
>> history is preferable:
>> 
>>     ---A---D---C'--
>>         \     /
>>          '-B-'
>
> Better:
>
>      ---A--D--E--C'
>          \      /
>           `----B

Yup, that topology is what Kacper's workflow wants.

Stepping back a bit, however, I am not sure if that is really true.
The goal of this topic seems to be to keep one integration branch
and always merge *into* that integration branch, never *from* it,
but for what purpose?  Making the "log --first-parent" express the
integration branch as a linear series of progress?  If so, I suspect
a project with such a policy would dictate that D and E also be on a
side branch, i.e. the history would look more like this:

      D---E
     /     \
  --A-------X---C---
     \         /
      `-------B

with X being a --no-ff merge of the topic that consists of these two
commits.

> In this case, the commit message should say... what? Certainly not the
> same thing. But I do not see that you changed anything in this regard.

True.  If the goal is to emulate a merge of B from a side branch
into _the_ integration branch, the summary should also emulate the
message that would be given when the remote pulled from your current
branch.

      reply	other threads:[~2012-11-28 16:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 23:00 [PATCH v2 0/3] Add option to change order of parents in merge commit Kacper Kornet
2012-11-27 23:00 ` [PATCH v2 1/3] Process MERGE_MODE before MERGE_HEAD Kacper Kornet
2012-11-27 23:00 ` [PATCH v2 2/3] Allow for MERGE_MODE to specify more then one mode Kacper Kornet
2012-11-28  2:17   ` Junio C Hamano
2012-11-28  4:36     ` Kacper Kornet
2012-11-28  7:30       ` Junio C Hamano
2012-11-27 23:00 ` [PATCH v2 3/3] Add option to transpose parents of merge commit Kacper Kornet
2012-11-28  2:18   ` Junio C Hamano
2012-11-28  4:43     ` Kacper Kornet
2012-11-28  6:56   ` Johannes Sixt
2012-11-28 16:52     ` Junio C Hamano [this message]

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=7vr4ndhdp7.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=aaron@schrab.com \
    --cc=draenog@pld-linux.org \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /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).