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

Re: rebase -p loses amended changes

From
Thomas Rast <trast@student.ethz.ch>
Date
Mar 30, 2012, 22:49 UTC
Message-ID
<87ty15vh4c.fsf@thomas.inf.ethz.ch>
In-Reply-To
<CADb3U=4DNt7Jnzq4eW-K+W1_sEfMgL6MxqY6qmPaJZagiFdmmg@mail.gmail.com>
J Robert Ray <jrobertray@gmail.com> writes:
> If a merge is amended to add changes to a file unaffected by the
> merge, these changes are lost after a rebase. Attached is a script to
> demonstrate the problem.
> 4. Merge (--no-ff) "mod-a" onto master.
>
> 5. Amend the merge with a modification to a.
> 7. Rebase -p master onto "master-copy."
>
> Notice the change to "a" from step #5 is now gone. "a" reverts to the
> pre-amended version after step #4.

That's pretty much expected. rebase -p attempts to (conflicts will happen again) replay the merge. I don't think anybody's come up with a clear idea of how to apply the conflicted or evil parts of the merge mechanically.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: J Robert Ray
Message 2 of 2 in “rebase -p loses amended changes”
  1. J Robert RayMar 30, 2012
  2. Thomas RastMar 30, 2012

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.