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

[BUG?] rebase -i: edit versus unmerged changes

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Mar 19, 2013, 09:37 UTC
Message-ID
<CALkWK0n=fb_kq+Ed3rd9MhQUCHY3+_nj=zw4M+GmjbzEO56SOg@mail.gmail.com>
Hi,
I have the following instruction sheet:
  pick 2f7c86e remote.c: simplify a bit of code using git_config_string()
  pick c7f7ae4 remote.c: introduce a way to have different remotes for
fetch/push
  edit 7038841 remote.c: introduce remote.pushdefault
  edit 73413b0 remote.c: introduce branch.<name>.pushremote
  pick 7f47687 WIP: fetch-push: write a test

When I get to 7038841, I edit config.txt, stage the changes and commit --amend, before executing rebase --continue. When I get to 73413b0 (the next commit), I get a conflict which is auto-resolved by rerere. So, I just make further changes to config.txt, and commit --amend before executing rebase --continue as before. Unfortunately, this squashes 73413b0 into 7038841, because the merge conflict requires a commit to resolve the merge and pick the commit; this is different from commit --amend, which worked in the previous case, because the commit was already picked.

I know that this is expected behavior, but is there an easy way to get rid of this inconsistency? I'd ideally like everything to use the sequencer, and have uniform --continue/ --abort/ --skip semantics, but that would require re-implementing all the shell commands in C unless we can think of exposing a generic API using stdin or something. Does anyone have ideas in this direction?

Thanks.
Ram
Next: Andrew Wong
Message 1 of 10 in “[BUG?] rebase -i: edit versus unmerged changes”
  1. Ramkumar RamachandraMar 19, 2013
  2. Andrew WongMar 19, 2013
  3. Ramkumar RamachandraMar 20, 2013
  4. Jonathan NiederMar 20, 2013
  5. Junio C HamanoMar 20, 2013
  6. Ramkumar RamachandraMar 22, 2013
  7. Jonathan NiederMar 22, 2013
  8. Junio C HamanoMar 22, 2013
  9. Ramkumar RamachandraMar 23, 2013
  10. Junio C HamanoMar 24, 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.