Re: Problem with CRLF line endings and colored diff

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Problem with CRLF line endings and colored diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:29

Jean-Luc Herren [off-list ref] writes:
    <GREEN FOREGROUND>+<RESET><GREEN FOREGROUND>
    line2<RESET><RED BACKGROUND><CR><RESET><LF>
This is expected and deliberate, as you haven't told about your desire to
consider carriage-returns not as line termination letter.  By default CR
is just one of the whitespace letters, and colored diff output is
reminding you that you introduced a line with a trailing whitespace.

Check git-config(1) and look for "core.whitespace", paying special
attention to "cr-at-eol".

Re: Problem with CRLF line endings and colored diff

From: Jean-Luc Herren <hidden>
Date: 2016-06-15 22:45:29

Junio C Hamano wrote:
Jean-Luc Herren [off-list ref] writes:
quoted
    <GREEN FOREGROUND>+<RESET><GREEN FOREGROUND>
    line2<RESET><RED BACKGROUND><CR><RESET><LF>
This is expected and deliberate, as you haven't told about your desire to
consider carriage-returns not as line termination letter.  By default CR
is just one of the whitespace letters, and colored diff output is
reminding you that you introduced a line with a trailing whitespace.
Ah, I see, I didn't know I have to tell it that I want to use
CRLF...  Works fine now.  Sorry for the noise.

jlh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help