Re: git rebase --preserve-merges seems to not work
- From
Joshua Jensen <jjensen@workspacewhiz.com>
- Date
- Sep 9, 2010, 06:26 UTC
- Message-ID
- <4C887E22.5050303@workspacewhiz.com>
- In-Reply-To
- <20100909055104.GA21004@atjola.homenet>
----- Original Message ----- From: Björn Steinbrink Date: 9/8/2010 11:51 PM
Show 24 quoted lines
>> $ git lg --all >> * 2c93a8a - (HEAD) c (11 seconds ago) >> * 2b98bc6 - b (11 seconds ago) >> * 6abf527 - (d) d (3 minutes ago) >> | * 472fd93 - (bc-merge) Merge commit 'c' into HEAD (74 seconds ago) >> | |\ >> |/ / >> | * d132c87 - (c) c (3 minutes ago) >> | * 4a88fd1 - b (3 minutes ago) >> |/ >> * b576660 - (a, master) a (4 minutes ago) > What you actually wanted to replay is just the first-parent history, > redoing the merges with their respective original second parent. > Jonathan (Cc'ed) had the same problem about a month ago. > > The "first parent" thing isn't that well defined, criss-cross merges > combined with some unfortunate fast-forwards will easily make the > first-parent history become the one that you didn't mean (ask any > git-svn users that dared to use "git merge" without fully understanding > how git-svn uses the history ;-)), but it works in this special case. > And with that special case in mind (and admittedly probably not thinking > much further) I came up with this patch a few years ago: > > http://marc.info/?l=git&m=119379735525213&w=2
I hand merged your change in to my Git installation. There is one part of git-rebase--interactive that looks entirely different, so I would need to look back through the history to determine how to properly apply it.
The good news is the patch does exactly what I want in this simple case. I will have to try it on some more complicated hierarchies to see what the end result is.
It's curious... whenever I ask around about issue X or feature Y, a previously submitted patch can generally be found in the list archives. :)
Josh