Re: what is git's position on "classic" mac <CR>-only end of lines?
- From
Bryan Turner <bturner@atlassian.com>
- Date
- Oct 1, 2017, 19:29 UTC
- Message-ID
- <CAGyf7-H+1Djb_dmzfOO3qqM9+2VKvbqVedn4mof9Hq4huDTsqw@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.2.21.1710011349560.23227@localhost.localdomain>
On Sun, Oct 1, 2017 at 10:52 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
Show 6 quoted lines
> > sorry for more pedantic nitpickery, but i'm trying to write a > section on how to properly process mixtures of EOLs in git, and when i > read "man git-config", everything seems to refer to Mac OS X and macOS > (and linux, of course) using <LF> for EOL, with very little mention of > what one does if faced with "classic" mac EOL of just <CR>.
No command in Git that I'm aware of considers a standalone <CR> to be a line ending. A file containing only <CR>s is treated as a single line by every Git command I've used. I'm not sure whether that behavior is configurable. For files with standalone <CR>s mixed with other line endings (<CRLF> or <LF>, either or both), the <CRLF> and <LF> endings are both considered line endings while the standalone <CR>s are not.
That's just based on my experience with them, though. In general, `git blame` and `git diff`, for example, don't seem honor them. Perhaps someone else knows of some useful knows of which I'm not aware.
Best regards, Bryan Turner