Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes.Schindelin@gmx.de, git@vger.kernel.org
Subject: Re: [PATCH 1/1] Add --first-parent support to interactive rebase.
Date: Wed, 31 Oct 2007 06:53:03 +0100	[thread overview]
Message-ID: <20071031055303.GB3326@atjola.homenet> (raw)
In-Reply-To: <7vodefj2lk.fsf@gitster.siamese.dyndns.org>

On 2007.10.30 22:05:27 -0700, Junio C Hamano wrote:
> Your MUA seems to mark the UTF-8 message you are sending out as
> 8859-1, which means your name in the message gets corrupt.

Hm, that would be git-send-email then, anything I need to configure?
(Actually I don't see it marking the message as anything)

> Björn Steinbrink <B.Steinbrink@gmx.de> writes:
> 
> > By default, rebase will take all commits from the branch that is to be
> > rebased which are missing in upstream. The new --first-parent option
> > allows to just follow the first parent and thus completely ignore
> > merges.
> >
> > Additionally, when used together with --preserve-merges (which is the
> > more useful use-case) it will no longer rebase the commits from the
> > merged-in branches, but instead redo the merge with the original
> > parents.
> >
> > That means that:

Given this situation:

> >      ---H------I topicB
> >     /    \      \
> > ...
> > does no longer become:

Which results in:

> >                 -H'--------I'
> >                /  \         \
> >               D'---E'---F'---G' topicA
> >              /
> >     A---B---C master
> >      \
> >       H---I topicB

When you do "git-rebase -p -i master topicA"

You can now also get:

> >     A---B---C master
> > ...
> >         ---------H---------I topicB

When you do "git-rebase -p -i --first-parent master topicA"


That's better, right?

> And crucially, you forgot to say "... when you do X".
> 
> I am assuming that you meant:
> 
>     This (picture) becomes this (picture) instead of this (picture)
>     when you run "git rebase -p -m master topicA".
> 
> but without it, the nice ASCII drawings loses their value.

:-/

> It is somewhat disturbing that this treats the first parent too
> special.

The original use-case for the "-p -i --first-parent" case was a question
on #git, where someone had sth. like this:

   o---o---o---o---o remote/branch
        \           \
     o---o---o---o---o topicA
    /
   o---o---o master trunk

Now that guy was using git-svn to dcommit into svn from master. To
dcommit the changes from topicA he had to have that based on master, and
he wanted to preserve the merges from remote/branch to have them
squashed when dcommitted to svn. So what he wanted was:


     ...---o---o---o---o---o remote/branch
                \           \
             o---o---o---o---o topicA
            /
   o---o---o master trunk

The default behaviour of rebase would totally flat out the history and
instead of two sqaush merges (which he wanted), svn would've seen a huge
amount of commits comning from remote/branch. And the plain -p behaviour
would have duplicated all those branches from remote/branch for no good
reason, so I came up with that --first-parent thing.

Better ideas are welcome, I just don't know git well enough to come up
with anything better...

Thanks,
Björn

  reply	other threads:[~2007-10-31  5:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  2:21 [PATCH 1/1] Add --first-parent support to interactive rebase Björn Steinbrink
2007-10-31  3:34 ` Johannes Schindelin
2007-10-31  4:17   ` Björn Steinbrink
2007-10-31  4:50     ` Johannes Schindelin
2007-10-31  8:24     ` Wincent Colaiuta
2007-10-31  5:05 ` Junio C Hamano
2007-10-31  5:53   ` Björn Steinbrink [this message]
2007-10-31 13:43     ` Dmitry Potapov
2007-10-31 14:00       ` Karl Hasselström
2007-10-31 14:36         ` Dmitry Potapov
2007-10-31 18:05           ` Jeff King
2007-10-31 19:50             ` Björn Steinbrink
2007-10-31 21:53             ` Junio C Hamano
2007-10-31 21:56               ` Jeff King
2007-10-31 22:31                 ` Junio C Hamano
2007-11-01  3:23                   ` Jeff King
2007-11-01  4:10                     ` Junio C Hamano
2007-11-01  4:14                       ` Jeff King

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=20071031055303.GB3326@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=Johannes.Schindelin@gmx.de \
    --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