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

Re: [PATCH] mergetool: respect autocrlf by using checkout-index

From
HKHannu Koivisto <azure@iki.fi>
Date
Jan 27, 2009, 13:58 UTC
Message-ID
<83ocxsetqa.fsf@kalahari.s2.org>
In-Reply-To
<7vocxt3bsc.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Perhaps something along this line to teach
>>
>>     $ git merge-file --attribute-path=frotz.c file1 orig_file file2
>>
>> to merge what happened since orig_file to file2 into file1, and deposit
>> the result after converting it appropriately for path "frotz.c" obeying
>> core.autocrlf and gitattribute rules.
>>
>> I see rerere.c::merge() has the exact same issue, but its breakage is half
>> hidden by its use of fopen(path, "w").  It should explicitly use
>> convert_to_working_tree() like this patch does, and write the results out
>> in binary mode.
>
> Second try.  I forgot how convert_* worked X-<.

Argh, it seems I have wasted your time. That patch may do something useful but in this case with _or without_ it all the files seem to be correct in the filesystem before I save the merge result in emerge. I.e. it seems that for some reason Emacs detects the coding system of the result file incorrectly. I'll investigate that at some point especially if ediff suffers from the same problem.

-- 
Hannu
Previous: Junio C Hamano
Message 12 of 12 in “git diff, git mergetool and CRLF conversion”
  1. Hannu KoivistoJan 21, 2009
  2. Charles BaileyJan 21, 2009
  3. Theodore TsoJan 21, 2009
  4. mergetool: respect autocrlf by using checkout-indexCharles Bailey, Jan 21, 2009
  5. Junio C HamanoJan 23, 2009
  6. Charles BaileyJan 23, 2009
  7. Hannu KoivistoJan 26, 2009
  8. Charles BaileyJan 26, 2009
  9. Junio C HamanoJan 26, 2009
  10. Junio C HamanoJan 26, 2009
  11. Junio C HamanoJan 26, 2009
  12. Hannu KoivistoJan 27, 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.