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

git rebase --rebase-merges information loss (and other woes)

From
Yydirson@free.fr <ydirson@free.fr>
Date
Apr 3, 2021, 10:42 UTC
Message-ID
<1054682599.520899173.1617446548600.JavaMail.root@zimbra39-e7>
In-Reply-To
<1874143044.520636715.1617442122946.JavaMail.root@zimbra39-e7>

I've been going through a couple of "rebase -i -r" lately, and would like to share a couple of thoughts, starting with something looking like a bug.

1. when a merge has been done with "-s ours", rebase replays it without
any special options, I proceed with the manual resolution, and if I just
--continue, the rebase mechanism believes I want to drop the commit, which
could not be more wrong.  I can still be careful myself, and use "git commit
--allow-empty" before --continue, but this feels awkward.
Is there any compelling reason not record the merge here ?
2. more generally, when a merge has been done with special options, it
would be a useful help in solving conflicts if rebase could use the same
options.  Maybe we could allow the rebase "merge" instruction to use more
merge options.  The user would still have to edit the instruction sheet
manually for those, however, and we could then want "rebase -i" to fill
them automatically, but that would seem to require recording the merge
options somewhere to start with - maybe in a note.
3. while it's made clear that any conflict resolution and amendments
have to be redone, maybe we could provide some support for a common
use case, namely "sink that commit/fixup down".  The conflict
resolution would then be like "checkout $OLD && cherry-pick -n $FIXUP".

Maybe this could be activated by a merge option in rebase-interactive instructions, like "merge -C$OLD --fixup $F1 --fixup $F2".

Would that seem reasonable ?
-- 
Yann
Next: Sergey Organov
Message 1 of 4 in “git rebase --rebase-merges information loss (and other woes)”
  1. ydirson@free.frApr 3, 2021
  2. Sergey OrganovApr 3, 2021
  3. ydirson@free.frApr 3, 2021
  4. Sergey OrganovApr 3, 2021

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.