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

[PATCH/RFC 0/3] git rerere unresolve file

From
Johannes Sixt <j6t@kdbg.org>
Date
Nov 21, 2009, 18:58 UTC
Message-ID
<200911211958.40872.j6t@kdbg.org>

When you commit an incorrect conflict resolution, git rerere gets in the way: rerere clear only clears cache entries of not yet resolved conflicts. But there is no other way to remove an incorrect resolution short of purging the whole rr-cache.

This series implements 'git rerere unresolve' that removes a recorded resolution.

This is RFC for two reasons:
- It changes the contents of MERGE_RR in a way that *may* interfer in unwanted 
ways with older versions that do not understand unresolve.
- rerere unresolve also restores the conflict regions. I'm not sure whether 
this is good because there is 'git checkout --conflict=merge file' that does 
it in a better way. See the commit message of patch 3.

If rerere unresolve does *not* restore conflict regions (and record the result as preimage right away) we are facing a problem: When the resolution is committed, the postimage has differences from the preimage that are not related to the conflict. This may inhibit reusing the resolution later when the file has new changes.

Johannes Sixt (3):
  rerere: keep a list of resolved files in MERGE_RR
  rerere: make recording of the preimage reusable
  git rerere unresolve file...
 Documentation/git-rerere.txt |   10 +++-
 builtin-rerere.c             |   13 +++-
 rerere.c                     |  153 ++++++++++++++++++++++++++++++++++-------
 rerere.h                     |    4 +-
 4 files changed, 148 insertions(+), 32 deletions(-)
Next: Johannes Sixt
Message 1 of 7 in “git rerere unresolve file”
  1. 0/3 git rerere unresolve fileJohannes Sixt, Nov 21, 2009
  2. 1/3 rerere: keep a list of resolved files in MERGE_RRJohannes Sixt, Nov 21, 2009
  3. 2/3 rerere: make recording of the preimage reusableJohannes Sixt, Nov 21, 2009
  4. 3/3 git rerere unresolve file...Johannes Sixt, Nov 21, 2009
  5. Junio C HamanoNov 22, 2009
  6. Johannes SixtNov 22, 2009
  7. Nanako ShiraishiNov 24, 2009

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.