From: Thomas Rast Date: Mon, 04 Mar 2013 21:24:07 GMT Subject: Re: "git rebase" loses the additional changes in "evil" merges Message-ID: <87sj4aoo3s.fsf@pctrast.inf.ethz.ch> In-Reply-To: <7vtxoqx3s1.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > worley@alum.mit.edu (Dale R. Worley) writes: > >> (git version 1.7.7.6) >> >> I've been learning how to use Git. While exploring "git rebase", I've >> discovered that if the branch being rebased contains an "evil" merge, >> that is, a merge which contains changes that are in addition to the >> changes in any of the parent commits, the rebase operation will >> silenty lose those additional changes. > > I think this is to be expected for "git rebase", as it does not even > look at merges. It is a way to find non-merge commits that haven't > been applied yet, and apply them to the upstream to create a new > linear history. I can see the problem with --preserve-merges though. It will actually just *redo* the merge; the name is wrong in the sense that it undertakes nothing to preserve whatever evilness was in it. I suppose in theory it could first redo the merge on the original parents, and diff against the existing merge; that would be the evilness component. Then it could attempt to apply the same evilness on the new merge. -- Thomas Rast trast@{inf,student}.ethz.ch