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

From: Hannu Koivisto <[email-masked]>
Date: Tue, 27 Jan 2009 15:58:21 +0200

Junio C Hamano <[email-masked]> writes:

> Junio C Hamano <[email-masked]> 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