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

Re: [PATCH] rebase -i -p: use rerere to resolve conflicts if enabled

From
David Kilzer <ddkilzer@kilzer.net>
Date
Jun 17, 2012, 13:46 UTC
Message-ID
<1917D067-6FB3-4393-B178-BBE36B4B5D4E@kilzer.net>
In-Reply-To
<7vmx427aj0.fsf@alter.siamese.dyndns.org>
+ Johannes Schindelin  [sorry, should have added you at the beginning of the thread]
On Jun 16, 2012, at 10:49 PM, Junio C Hamano wrote:
Show 21 quoted lines
> David Kilzer <ddkilzer@kilzer.net> writes:
> 
>> On Jun 15, 2012, at 10:19 PM, Junio C Hamano wrote:
>> 
>>> I do not use the configuration variable myself, and I didn't check
>>> the code, but if you had rerere.autoupdate set, doesn't "git merge"
>>> in the codepath you are touching (or anywhere for that matter)
>>> already blindly take the replayed resolution and commit the result?
>> 
>> No, it does not.  That is what I originally expected to happen
>> when I used "git rebase -i -p" through a merge with conflicts, but
>> it currently does not behave this way.
> 
> After looking at what is done in t/t4200-rerere.sh, I think "git
> merge" (or anything that use --rerere-autoupdate, that is) is meant
> to exit with an error code after allowing rerere to add the result
> of replayed resolution to the index, so that the user can deal with
> any remaining paths that may be still in conflict.
> 
> Are you sure that the autoresolved paths are not "git add"ed when
> you have rerere.autoupdate set by "git merge" in "git rebase -i/-p"?
You are correct, autoresolved paths are "git add"ed when rerere.autoupdate is true.
Argh...in my original patch, I wasn't setting rerere.autoupdate.  After fixing that in the test, it's clear that the patch is no longer needed.
Show 7 quoted lines
> Or are you only talking about the error exit from "git merge" that
> would cause "git rebase -i" to stop and give control back to the end
> user?
> 
> I suspect that the latter behaviour to stop "rebase" in the middle
> is in line with the spirit of --rerere-autoupdate, and it is not
> likely that we would want to change it.
If it could be guaranteed that all changes in a merge commit would be preserved when running "git rebase -i -p" with rerere.autoupdate enabled, I think that would be an argument for not returning control to the user during the rebase operation.  However, changes to non-conflicted files in a merge commit are currently lost in this case, so it would be too dangerous to enable this behavior now.
Dave
Previous: Junio C HamanoNext: Johannes Sixt
Message 7 of 12 in “rebase -i -p: use rerere to resolve conflicts if enabled”
  1. rebase -i -p: use rerere to resolve conflicts if enabledDavid D. Kilzer, Jun 15, 2012
  2. Junio C HamanoJun 15, 2012
  3. David KilzerJun 16, 2012
  4. Junio C HamanoJun 16, 2012
  5. David KilzerJun 17, 2012
  6. Junio C HamanoJun 17, 2012
  7. David KilzerJun 17, 2012
  8. Johannes SixtJun 17, 2012
  9. David KilzerJun 17, 2012
  10. Johannes SixtJun 18, 2012
  11. Junio C HamanoJun 17, 2012
  12. Junio C HamanoJun 17, 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.