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

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

From
DWDale Worley <worley@c-66-31-108-177.hsd1.ma.comcast.net>
Date
Mar 5, 2013, 21:18 UTC
Message-ID
<201303052118.r25LIoAC000463@freeze.ariadne.com>
In-Reply-To
<7vtxoqx3s1.fsf@alter.siamese.dyndns.org>
Show 6 quoted lines
> From: Junio C Hamano <gitster@pobox.com>
> 
> 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 disagree. "git rebase" is not characterized as a way to "find
non-merge commits that haven't been applied yet", but rather (as
described in the git-rebase manual page):
 
    git-rebase - Forward-port local commits to the updated upstream head
    All changes made by commits in the current branch but that are not
    in <upstream> are saved to a temporary area. [...]  The commits
    that were previously saved into the temporary area are then
    reapplied to the current branch, one by one, in order.

Now if you read far enough down the page, I'm sure it warns about merge commits. But the stated basic *intention* is to replicate the existing branch, re-rooted at a new place on the upstream branch.

The current implementation fails this intention by losing changes made in merges. It fails this intention in a *dangerous* way by causing changes to be lost without warning.

Dale
Previous: Dale R. WorleyNext: Junio C Hamano
Message 10 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.