mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: Vladimir Nikishkin <>
Subject: Re: core.safecrlf warning is confusing[improvement suggestion?]
Date: Tue, 21 Nov 2017 14:44:04 +0900	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Vladimir Nikishkin's message of "Tue, 21 Nov 2017 13:18:30 +0800")

Vladimir Nikishkin <> writes:

> So I put the source in the working directory and tell git to make
> git diff --stat
> and I see the (ambiguous) warnings:
> 'warning: LF will be replaced by CRLF in filename.m.
> The file will have its original line endings in you working directory.'
> How I read them: "even though you have core.autocrlf=true, LF will be
> replaced by CRLF and the repository will store CRLF files. However,
> after you checkout them again, the CRLFs will be converted back to
> LF(because the files will have original line endings in the working
> directory.)"
>  I feel like it's the opposite of what is actually happening.
> So, would it make sense to change the warning message to? :
> 'warning: When you next checkout this commit, your code will have CRLF
> line endings. However, right now your files will not be altered.'

I actually think "git diff" should not be triggering the warning
message.  The message may be appropriate when you are doing "git
add", at which point the "will be replaced and that may not be what
you want to see" warning might apply, but "diff" is doing a read-only
thing and will not be replacing anything with any other thing.

  reply	other threads:[~2017-11-21  5:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21  5:18 core.safecrlf warning is confusing[improvement suggestion?] Vladimir Nikishkin
2017-11-21  5:44 ` Junio C Hamano [this message]
2017-11-21  5:49 ` Junio C Hamano
2017-11-21 16:18 ` Torsten Bögershausen
2017-11-22  2:01   ` Junio C Hamano
2017-11-22 14:56     ` 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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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

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).