Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH RFC] rebase: add --revisions flag
Date: Thu, 10 Dec 2009 12:08:40 +0100	[thread overview]
Message-ID: <20091210110840.GA12098@atjola.homenet> (raw)
In-Reply-To: <alpine.DEB.2.00.0912100937580.22606@ds9.cixit.se>

On 2009.12.10 09:43:51 +0100, Peter Krefting wrote:
> Björn Steinbrink:
> >"git merge" is about merging histories. --squash and the A..B you
> >suggest make it degenerate into merging changes (and you can't
> >record that using the commit DAG). So that messes things up
> >conceptually.
> 
> I know, this is the one "feature" of CVS that I sometimes miss in
> Git, that I cannot "merge" just parts of a history, and have that
> recorded in the history tree. I know it's wrong, I know I could do
> it better, but sometimes it's the shortcut that would make life
> easier for me. :-)

Hm, does CVS really record the fact that things were merged? I've never
seriously used CVS, so I have no idea... And if it does, is it just the
same thing as the svn "merge"-tracking?

> But the reason I mentioned it was because of the discussion on
> whether the "reverse rebase" should be an option to "cherry-pick" or
> not, and I mentioned that it could just as well be "merge" since it
> can be used to throw away history as well.

OK, and I disagreed because I think that "merge --squash" is already
wrong. And given your comment below about retiring "merge --squash", I
guess we're in agreement now, right?

> >Anyway, "git merge" with a range simply makes no sense at all
> >given how git's merge works (opposed to svn's idea of merging,
> >which is about changes, not about histories). If you want a squash
> >flag, tell cherry-pick to handle ranges and teach such a flag to
> >it.
> 
> And tell "merge" to tell me that if I try, so that if I try
> 
>   $ git merge A..B
> 
> I would get a message saying something like
> 
>   Cannot merge a range of commits. Try "git cherry-pick A..B" or
>   "git rebase --reverse A..B".

Hm, for an error message that "range of commits" is probably on the edge
of being confusing. After all "git merge B" will create a new commit M
that "says" that M^1..M^2 was merged to M^1. But I can't come up with a
better error message either.

> And perhaps we could also in the same way retire --squash?
> 
>   $ git merge --squash B
>   The "--squash" option is obsolete. Please use "git cherry-pick
>   --squash B".

git cherry-pick --squash ..B # Not just B itself, but the whole range

> (with a transition period where it would just call the other). Or
> whatever the options to simulate the old behaviour would be. This
> would make it clearer that "merge" preserves history while
> "cherry-pick" and "rebase" do not.

I'd certainly like that.

Bjoern

  reply	other threads:[~2009-12-10 11:08 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 14:47 [PATCH RFC] rebase: add --revisions flag Michael S. Tsirkin
2009-12-08 16:08 ` Björn Steinbrink
2009-12-08 16:11   ` Michael S. Tsirkin
2009-12-08 16:41     ` Björn Steinbrink
2009-12-08 16:49       ` Michael S. Tsirkin
2009-12-08 19:13         ` Björn Steinbrink
2009-12-08 16:14   ` Michael S. Tsirkin
2009-12-08 16:37     ` Björn Steinbrink
2009-12-08 16:44       ` Michael S. Tsirkin
2009-12-08 19:11         ` Björn Steinbrink
2009-12-08 20:00           ` Michael S. Tsirkin
2009-12-09 13:19             ` Björn Steinbrink
2009-12-09 14:02               ` Michael S. Tsirkin
2009-12-09  4:51         ` Miles Bader
2009-12-08 20:22 ` Junio C Hamano
2009-12-08 20:29   ` Sverre Rabbelier
2009-12-09  5:30     ` Christian Couder
2009-12-09  6:52       ` Christian Couder
2009-12-09  9:08         ` Sverre Rabbelier
2009-12-09  8:47   ` Peter Krefting
2009-12-09  9:37     ` Michael S. Tsirkin
2009-12-09 10:52       ` Peter Krefting
2009-12-09 11:22         ` Björn Steinbrink
2009-12-09 11:48           ` Andreas Schwab
2009-12-09 12:06             ` Björn Steinbrink
2009-12-09 12:07               ` Michael S. Tsirkin
2009-12-09 13:06                 ` Björn Steinbrink
2009-12-09 19:46                   ` Junio C Hamano
2009-12-10  7:43                     ` Björn Steinbrink
2009-12-10 17:20                       ` Junio C Hamano
2009-12-11 11:07                         ` Björn Steinbrink
2009-12-09 13:20           ` Peter Krefting
2009-12-09 13:41             ` Björn Steinbrink
2009-12-10  8:43               ` Peter Krefting
2009-12-10 11:08                 ` Björn Steinbrink [this message]
2009-12-09 10:38   ` Michael S. Tsirkin
2009-12-09 10:55     ` Matthieu Moy
2009-12-09 13:30   ` Matthieu Moy
2009-12-09 13:45     ` Michael S. Tsirkin
2009-12-09 14:01       ` Björn Steinbrink
2009-12-09 14:12         ` Michael S. Tsirkin
2009-12-09 20:10     ` Junio C Hamano
2009-12-13 22:47   ` David Kågedal

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=20091210110840.GA12098@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mst@redhat.com \
    --cc=peter@softwolves.pp.se \
    /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