On 2016-01-22 20.04, Johannes Schindelin wrote:
> Hi Junio,
>
> On Fri, 22 Jan 2016, Junio C Hamano wrote:
>
>> Johannes Schindelin <[email protected]> writes:
>>
>>> Signed-off-by: Johannes Schindelin <[email protected]>
>>> ---
>>
>> This change somehow ringed a bell and reminded me of your recent
>> ls-files stuff. Are there things that these topics can use from
>> each other?
>
> Quite possibly. I'll have a look tomorrow.
Something like this should do:
(Fully untested)
enum eol eol_for_path(const char *path, const char *src, size_t len)
{
struct conv_attrs ca;
if (!path)
path = "*"; /* catch * text=xxx */
convert_attrs(&ca, path);
ca.crlf_action = input_crlf_action(ca.crlf_action, ca.eol_attr);
return output_eol(crlf_action);
}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html