From: "Torsten Bögershausen" <tboegi@web.de>
To: "Sokolov, Konstantin (ext)" <konstantin.sokolov.ext@siemens.com>,
"'git@vger.kernel.org'" <git@vger.kernel.org>
Subject: Re: git blame swallows up lines in case of mixed line endings
Date: Sat, 21 Feb 2015 14:45:30 +0100 [thread overview]
Message-ID: <54E88BFA.9050900@web.de> (raw)
In-Reply-To: <71BF70CE41AEE741896AF3A5450D86F11F2D1F46@DEFTHW99EH3MSX.ww902.siemens.net>
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 ?
next prev parent reply other threads:[~2015-02-21 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 13:48 git blame swallows up lines in case of mixed line endings Sokolov, Konstantin (ext)
2015-02-21 13:45 ` Torsten Bögershausen [this message]
2015-02-23 11:50 ` AW: " Sokolov, Konstantin (ext)
2015-02-23 18:44 ` Junio C Hamano
2015-02-23 19:09 ` AW: " Sokolov, Konstantin (ext)
2015-02-23 20:27 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E88BFA.9050900@web.de \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=konstantin.sokolov.ext@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).