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

Re: Converting merge to rebase in the presence of conflicts

From
Hrvoje Nikšić <hniksic@gmail.com>
Date
Apr 11, 2011, 15:15 UTC
Message-ID
<BANLkTinVUdmG56oPQXvMhFh6hLcFj3_jZg@mail.gmail.com>
In-Reply-To
<4DA3182B.2030305@viscovery.net>

Thanks for the responses, rerere works nicely, if somewhat cryptic. At the rebase step I got:

First, rewinding head to replay your work on top of it...
Applying: changed2
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging a
CONFLICT (content): Merge conflict in a
Resolved 'a' using previous resolution.
Failed to merge in the changes.
Patch failed at 0001 changed2

When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort".

That's a lot of output, some of it scary-looking. (OK, maybe not
scary-looking to me, but certainly so to someone not yet fully
comfortable with git.)  Running "git rebase --continue" told me I
needed to "edit all merge conflicts and then mark them as resolved",
whereas the conflicts are in fact already resolved, but rebase doesn't
know it.  Again, this isn't a big problem for me, but it's unfriendly.
 "git add" followed by "git rebase --continue" worked exactly as I
hoped it would.

I still wonder why rerere is necessary here. After all, even without the rerere metadata, the information about conflict resolution is right there, in the merge commit, and rebase could conceivably make use of it. What am I missing?

Hrvoje
Previous: Johannes SixtNext: Michael Haggerty
Message 4 of 6 in “Converting merge to rebase in the presence of conflicts”
  1. Hrvoje NikšićApr 11, 2011
  2. Michael J GruberApr 11, 2011
  3. Johannes SixtApr 11, 2011
  4. Hrvoje NikšićApr 11, 2011
  5. Michael HaggertyApr 12, 2011
  6. Johannes SixtApr 12, 2011

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.