git/list[1] front-page[2] threads[3] people[4] search[5] about
 

"git rebase" loses the additional changes in "evil" merges

From
Dale R. Worley <worley@alum.mit.edu>
Date
Mar 4, 2013, 20:58 UTC
Message-ID
<201303042058.r24KwwEx012408@freeze.ariadne.com>
(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 believe that this is a serious bug.

The problem is not that Git does not propagate the additional changes (although I'd like it to do so), the problem is that the rebase *silently loses* changes in the code. It would be acceptable if Git detected the evil merge, notified me of it, and forced me to manually re-do it in order to finish the rebase.

Throughout the Git design (as in other SCMs), care has been taken to not lose changes that the user has introduced. In this situation, that principle is violated.

I have a script that demonstrates this failure, if that would be useful for testing purposes.

Dale
Next: Junio C Hamano
Message 1 of 13 in “"git rebase" loses the additional changes in "evil" merges”
  1. Dale R. WorleyMar 4, 2013
  2. Junio C HamanoMar 4, 2013
  3. Thomas RastMar 4, 2013
  4. Junio C HamanoMar 4, 2013
  5. What I want rebase to doDale R. Worley, Mar 6, 2013
  6. Thomas RastMar 7, 2013
  7. Johannes SixtMar 7, 2013
  8. Junio C HamanoMar 7, 2013
  9. Dale R. WorleyMar 7, 2013
  10. Dale WorleyMar 5, 2013
  11. Junio C HamanoMar 5, 2013
  12. Philip OakleyMar 5, 2013
  13. Junio C HamanoMar 5, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.