Re: [PATCH 1/1] Add --first-parent support to interactive rebase.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: <Johannes.Schindelin@...>, <git@...>
Date: Wednesday, October 31, 2007 - 1:53 am

On 2007.10.30 22:05:27 -0700, Junio C Hamano wrote:

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


Given this situation:


Which results in:


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

You can now also get:


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


That's better, right?


:-/


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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/1] Add --first-parent support to interactive re..., Björn, (Wed Oct 31, 1:53 am)