git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* EOL LF Windows auto.crlf issue
@ 2017-06-24 16:56 Filip Kucharczyk
  2017-06-24 22:02 ` Torsten Bögershausen
  0 siblings, 1 reply; 2+ messages in thread
From: Filip Kucharczyk @ 2017-06-24 16:56 UTC (permalink / raw)
  To: git

I'm on Windows 10.
auto.crlf in .gitconfig is set to
[core]
autocrlf = true
I've got a git (git version 2.13.1.windows.2) repo.
A linux guy emails me a text with with line endings LF.
I paste this file into my repo.
Now every time I introduce changes to this file and stage it, git tell me:
"warning: LF will be replaced by CRLF in a.txt.
The file will have its original line endings in your working directory."
But when I commit the file git does not replace anyline endings - they
stay LF in the commited file and in my working direcotry.
I'm sort of misleaded by this message.

Filip

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: EOL LF Windows auto.crlf issue
  2017-06-24 16:56 EOL LF Windows auto.crlf issue Filip Kucharczyk
@ 2017-06-24 22:02 ` Torsten Bögershausen
  0 siblings, 0 replies; 2+ messages in thread
From: Torsten Bögershausen @ 2017-06-24 22:02 UTC (permalink / raw)
  To: Filip Kucharczyk, git



On 24/06/17 18:56, Filip Kucharczyk wrote:
> I'm on Windows 10.
> auto.crlf in .gitconfig is set to
> [core]
> autocrlf = true
> I've got a git (git version 2.13.1.windows.2) repo.
> A linux guy emails me a text with with line endings LF.
> I paste this file into my repo.
> Now every time I introduce changes to this file and stage it, git tell me:
> "warning: LF will be replaced by CRLF in a.txt.

This conversion will happen if you do
rm a.txt
git checkout a.txt

After these 2 steps, the file willhave CRLF in the working tree,
see below.
But if you don't, the file stays as it is in the working tree.

> The file will have its original line endings in your working directory."

> But when I commit the file git does not replace anyline endings - they
> stay LF in the commited file and in my working direcotry.

Yes, core.autocrlf=true tells Git that they should have CRLF in the working 
tree, at least after a clean checkout.
> I'm sort of misleaded by this message.
Suggestions how to improve things are of course welcome -
for your case it may help to set
git config core.autocrlf input
for this very repo.

> 
> Filip
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-24 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24 16:56 EOL LF Windows auto.crlf issue Filip Kucharczyk
2017-06-24 22:02 ` Torsten Bögershausen

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