All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Organov <osv@javad.com>
To: Nico Williams <nico@cryptonector.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, "Besen\,
	David" <david.besen@hp.com>,
	"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Amending merge commits?
Date: Wed, 30 Jul 2014 22:28:23 +0400	[thread overview]
Message-ID: <877g2uu2ew.fsf@osv.gnss.ru> (raw)
In-Reply-To: <CAK3OfOgcO9dmePtXCu9gUSf2bdQytJf9-RCZDXhv9Gy8UVyDOQ@mail.gmail.com> (Nico Williams's message of "Wed, 30 Jul 2014 12:43:14 -0500")

Nico Williams <nico@cryptonector.com> writes:

> On Wed, Jul 30, 2014 at 3:42 AM, Sergei Organov <osv@javad.com> wrote:
>> Nico Williams <nico@cryptonector.com> writes:
>>> Local merge commits mean that you either didn't rebase to keep all
>>> your local commits on top of the upstream, or that you have multiple
>>> upstreams (the example exception I gave).
>>
>> I rather have multiple (release) branches on single upstream, say, v2.3
>> and v2.4. When something needs to be fixed in 2.3, it's fixed there and
>> pushed upstream, then, on 2.4, the 2.3 is merged to it, and result is
>> pushed upstream. When I do this merge, I need to push the merge
>
> Hmm, why not cherry-pick the fix?  That's how every project I know
> that ports fixes across release branches does it.

Cherry-pick? Why bother? What problem do we solve, having no merges
whatsoever? Why? GIT is so good at merges!

My impression is that people mostly rather do topic branches, and merge
them wherever they need the fixes, no?

>> upstream, and this won't work reliably when --rebase=true is acitve
>> (through pull.merge=rebase). If nothing changes upstream, I can simply
>> push this, and the merge is correctly preserved. However, if somebody
>> makes any changes upstream while I perform the merge, I'll need to pull
>> before pushing, and this immediately flattens-out my merge, that is
>> absolutely not what is needed here. Or I can simply pull before push,
>> just in case, and this flattens history even when there are no any
>> changes upstream!
>
> Does this change if you give your merge commits an different commit
> message?

Different from what? I'm almost sure commit message has nothing to do
with it. Please refer to this explanation to see for yourself how git
behaves when rebasing:

http://www.mail-archive.com/git%40vger.kernel.org/msg55605.html

>
>>> Conversely, if you always rebase your local commits on top of the
>>> upstream then you won't have merge commits to worry about.
>>
>> Wrong. I do alwys rebase my local commits on top of upstream, but I
>> still do have my own merge commits to worry about, as explained above.
>
> If you cherry-pick the cross-release-branch commits you'll not have a
> merge commit to worry about.

I fail to see why do you consider merge commits to be an evil, really. I
didn't think about cherry-picking carefully, but I don't feel
cherry-picking is the best tool for the job here. I suspect random
cherry-picking would create a mess, sooner or later.

-- 
Sergey.

  reply	other threads:[~2014-07-30 18:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 21:47 Amending merge commits? Nico Williams
2014-07-29  9:58 ` Sergei Organov
2014-07-29 15:44   ` Nico Williams
2014-07-29 19:29     ` Philip Oakley
2014-07-29 20:19       ` Nico Williams
2014-07-29 21:38         ` Philip Oakley
2014-07-29 22:07           ` Nico Williams
2014-07-30  8:42     ` Sergei Organov
2014-07-30 17:43       ` Nico Williams
2014-07-30 18:28         ` Sergei Organov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-25 22:03 Besen, David
2014-07-25 22:11 ` David Besen
2014-07-25 22:19 ` Jonathan Nieder
2014-07-25 22:23   ` Besen, David
2014-07-25 22:31     ` Jonathan Nieder
2014-07-28 19:37       ` Sergei Organov
2014-07-28 20:00         ` Jonathan Nieder
2014-07-28 20:53           ` Sergei Organov

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=877g2uu2ew.fsf@osv.gnss.ru \
    --to=osv@javad.com \
    --cc=david.besen@hp.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=nico@cryptonector.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.