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 17, 2012, 11:03 UTC
Message-ID
<4F646F79.9090408@lyx.org>
In-Reply-To
<7vobrwh4zc.fsf@alter.siamese.dyndns.org>
Op 16-3-2012 17:42, Junio C Hamano schreef:
Show 17 quoted lines
> Junio C Hamano<gitster@pobox.com>  writes:
>
>> Vincent van Ravesteijn<vfr@lyx.org>  writes:
>>
>>> No, I turned rerere.autoupdate off. Proven in the above by the line
>>> "Resolved... " instead of "Staged...".
>> Yeah, actually I just tried and the procedure works with or without
>> autoupdate for me.
>>
>> So there is something different between our setup (or the nature of the
>> conflict), but I do not know what it is offhand.
> The last message from me on this topic for now as I'll be a bit too busy,
> but a wild guess/hunch: grep NEEDSWORK near rerere.c::handle_cache()?
>
> I suspect that we might need to also update this function to handle "both
> sides added, but differently" case, as we do so in check_one_conflict()
> these days, but for Vincent's particular case that shouldn't be the cause.
Yes, the problem is with the renormalization (of eol style) in handle_cache.

When I've set 'core.autocrlf = true', 'git rerere forget' fails because it does not renormalize. The sha1 of the merge conflict is computed with 'crlf' line-ending in handle_file, but with 'lf' line-ending in handle_cache.

Even if I change the code to do the renormalization, it fails. In 'renormalize_buffer; , the buffer is converted to 'crlf' by 'convert_to_working_tree_internal', but at the end it is converted back to 'lf' by 'convert_to_git'

I don't understand the logic of 'convert_to_git' and 'crlf_to_git' well enough to pinpoint what is going wrong exactly.

Vincent
Previous: Junio C Hamano
Message 16 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.