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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Björn
Date: Tuesday, October 30, 2007 - 9:17 pm

On 2007.10.31 03:34:47 +0000, Johannes Schindelin wrote:

Hm, I think that it might make might sense without -p. Say that your
topic branch is following two other branches like this:

---o---o---o--------o topicB
            \        \
--o---A---o---o---o---o---B topicA
         /       /
o---o---o---o---o master

topicB branched off from master earlier than topicA and you currently
require stuff from master..topicB _and_ topicB..master, so AFAICT, you
need sth. like the above.

Let's say that topicB simplifies some internal API and you desperately
wanted to use that, while master introduced some new stuff that you also
use. Now your stuff is finished, but it becomes obvious that topicB is
still too broken to go into master any time soon. Then you could do:

git rebase -i --first-parent master topicA

to get:

--o---o---o topicB (branched from master somewhere to the left)

             o---o---o---A---B topicA
            /
---o---o---o master

Depending on how much topicA really depends on topicB, you might need to
fix a bunch of stuff, but it might be worth it.

How about:
\--first-parent::
	When this option is given and --preserve-merges is not, then
	merge commits are completely ignored and only commits from the
	first parent ancestry are rebased. This allows to pretend that
	merges never happened.

	If --preserve-merges is also given, the merge commits are
	preserved, but only their first parent is rebased as opposed to
	the default behaviour which would rebase all parents.


Ok, might take some time, as I currently have no clue how the test stuff
for git works :-/ Well, I'm sure #git will be helpful :-)

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:
[PATCH 1/1] Add --first-parent support to interactive rebase., Björn Steinbrink, (Tue Oct 30, 7:21 pm)
Re: [PATCH 1/1] Add --first-parent support to interactive ..., Johannes Schindelin, (Tue Oct 30, 8:34 pm)
Re: [PATCH 1/1] Add --first-parent support to interactive ..., Björn, (Tue Oct 30, 9:17 pm)
Re: [PATCH 1/1] Add --first-parent support to interactive ..., Johannes Schindelin, (Tue Oct 30, 9:50 pm)
Re: [PATCH 1/1] Add --first-parent support to interactive ..., Wincent Colaiuta, (Wed Oct 31, 1:24 am)