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

Re: Edit a rerere conflict resolution

From
Vincent van Ravesteijn <vfr@lyx.org>
Date
Mar 12, 2012, 20:20 UTC
Message-ID
<4F5E5A77.1070605@lyx.org>
In-Reply-To
<7vobs1r3kn.fsf@alter.siamese.dyndns.org>
Op 12-3-2012 21:01, Junio C Hamano schreef:
Show 27 quoted lines
> Vincent van Ravesteijn<vfr@lyx.org>  writes:
>
>> Would it be a useful addition to have a command 'git rerere edit
>> <path>  <commit>' ?
>>
>> This would allow the user to edit the conflict resolution which was
>> used in a certain commit (merge, rebase.. ).
>>
>> Now I tend to grep in the .git/rr-cache directory, because I don't
>> want to do 'git rerere forget' as this would require me to refix more
>> resolution than needed.
> I haven't find it necessary in practice, as the re-fix for me
> typically would go like this:
>
>      $ git merge other-branch
>      ... rerere kicks in; eyeball the results
>      ... ah, my earlier resolution is no longer correct
>      $ edit $the_path
>      ... test the result of manual edit in the context of the merged whole
>      ... and be satisified
>      $ git rerere forget $the_path
>      $ git add $the_path
>      $ git commit
>      ... rerere records the updated resolution
>
> What scenario do you have in mind that you would need to re-fix more
> resolution than you need?

Context: I have a number of topic branches that modify the fileformat version and also the fileformat conversion routines. When merging all those branches into an integration branch (like you regenerate pu), there are a lot of annoying merge conflicts in these two files. From one of your scripts I took some code to automatically commit the merge resolution (here I go wrong, I probably neglected the reason that git doesn't allow to autocommit (yet)).

I can of course disable the autocommit, run the merge sequence again, commit the correct merge resolutions, and modify the merge resolution that went wrong.

But somehow I felt I was missing the 'git rerere edit' command. Aren't the recorded merge resolutions essentially part of the codebase, though in practice they remain rather anonymous temporary thingies.

But well, if the experts don't feel the need, I will search further to implement something that you do think is useful ;).

Vincent
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 16 in “Edit a rerere conflict resolution”
  1. Vincent van RavesteijnMar 12, 2012
  2. Junio C HamanoMar 12, 2012
  3. Vincent van RavesteijnMar 12, 2012
  4. Junio C HamanoMar 12, 2012
  5. Vincent van RavesteijnMar 12, 2012
  6. Junio C HamanoMar 12, 2012
  7. Vincent van RavesteijnMar 12, 2012
  8. Jakub NarebskiMar 12, 2012
  9. Junio C HamanoMar 12, 2012
  10. Vincent van RavesteijnMar 16, 2012
  11. Junio C HamanoMar 16, 2012
  12. Vincent van RavesteijnMar 16, 2012
  13. Junio C HamanoMar 16, 2012
  14. Vincent van RavesteijnMar 16, 2012
  15. Junio C HamanoMar 16, 2012
  16. Vincent van RavesteijnMar 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.