Subject: Re: git blame swallows up lines in case of mixed line endings

From: Torsten Bögershausen <[email-masked]>
Date: Sat, 21 Feb 2015 14:45:30 +0100

On 2015-02-19 14.48, Sokolov, Konstantin (ext) wrote:
> Hi Folks,
> 
> I encounter unexpected behavior in the following case:
> 
> file content:
> 
> line1<CR><LF>
> line2<CR>
> line3<CR><LF>
> line4
> 
> This is what I get as console output (on Windows):
> 
>> git blame -s file.txt
> 7db36436 1) line1
> line3436 2) line2
> 7db36436 3) line4
> 
> This is the real content:
> 
>> git blame -s file.txt > blame.txt
> 
> blame.txt opened in Notepad++:
> 
> 7db36436 1) line1 <CR><LF>
> 7db36436 2) line2 <CR>
> line3 <CR><LF>
> 7db36436 3) line4 <LF>
> 
> Admittedly, very stupid editors, such as Windows Notepad, cannot handle mixed line endings as well. But is this also the way git blame should behave?
> 
> Kind regards
> Konstantin
>
Git (and other tools) do not handle a single CR as a line ending.
A line ending in Git is either CRLF or LF.

A "mixed line ending" in Git sense is a mixture between CRLF and LF, 
but not a lone CR.
(And in this sense it is the expected behavior)

Are you sure you want to use it, or is it a typo ?