Re: Bug: Problem with CRLF line ending in git-diff with coloring
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Feb 9, 2014, 18:30 UTC
- Message-ID
- <52F7C956.5040604@kdbg.org>
- In-Reply-To
- <20140209110155.GB16189@scotty.home>
Am 09.02.2014 12:01, schrieb Stefan-W. Hahn:
Show 5 quoted lines
> Good morning, > > when diffing output where files have CRLF line ending, the coloring > seems wrong, because in changed lines the CR (^M) is highlighted, > even if the line ending has not changed.
...
> If WS_CR_AT_EOL is set in ecbdata->ws_rule, it works correctly, but this seems > not the right solutions.
It's the right solution. IOW, you should place something like this in your .gitattributes:
*.html whitespace=cr-at-eol
-- Hannes