From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: "Torsten Bögershausen" <tboegi@web.de>, git@vger.kernel.org
Subject: Re: git diff: meaning of ^M at line ends ?
Date: Tue, 15 May 2018 20:04:45 +0200 [thread overview]
Message-ID: <ec5c536a-708a-1fd2-6ee2-98271b90b0fb@googlemail.com> (raw)
In-Reply-To: <8d7e4807-9a79-e357-8265-95f22ab716e0@web.de>
Am 14.05.2018 um 20:13 schrieb Torsten Bögershausen:
> ^M is the representation of a "Carriage Return" or CR.
> Under Linux/Unix/Mac OS X a line is terminated with a single
> "line feed", LF.
>
> Windows typically uses CRLF at the end of the line.
> "git diff" uses the LF to detect the end of line,
> leaving the CR alone.
>
> Nothing to worry about.
Thanks, I already suspected something like that.
Has this behavior been changed/added recently ?
I didn't observe it before, although the project I'm currently looking
into has always been using CR+LF...
Why does the ^M only show up in '+' lines ?
When changing the line end from CR+LF to LF, the diff looks like this:
-blahblah
+blahblah
But I would expect it to be
-blahblah^M
+blahblah
Regards,
Frank
> If you want, you can commit those files with
> CRLF in the working tree, and LF in the repo.
>
> More information may be found here:
>
> https://git-scm.com/docs/gitattributes
>
> (Or ask more questions here, if needed)
next prev parent reply other threads:[~2018-05-15 18:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 16:08 git diff: meaning of ^M at line ends ? Frank Schäfer
2018-05-14 18:13 ` Torsten Bögershausen
2018-05-15 18:04 ` Frank Schäfer [this message]
2018-05-18 15:03 ` Torsten Bögershausen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ec5c536a-708a-1fd2-6ee2-98271b90b0fb@googlemail.com \
--to=fschaefer.oss@googlemail.com \
--cc=git@vger.kernel.org \
--cc=tboegi@web.de \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).