Re: unclear docs
- Date: Mon, 28 Jan 2019 17:31:42 +0000
- From: Torsten Bögershausen <tboegi@xxxxxx>
- Subject: Re: unclear docs
On Sun, Jan 27, 2019 at 02:55:23PM +0300, Sergey Lukashev wrote:
> A follow up on my previous mail.
> Well, I have two problems:
> 1) The endings I get with core.autocrlf=false depend on whether I have * text=auto (a file was commited with LFs). At least in git 2.20.1
> 2) If the quote holds true then autocrlf=false is actually "true" (for output conversion) on Windows by default because default core.eol is 'native', which is CRLF. I believe autocrlf=false is supposed to mean "no any conversion, input or output, read or write the repo as is".
> 27.01.2019, 13:05, "Sergey Lukashev" <lukashev.s@xxxxx>:
> > Hello!
> > Could somebody please explain what 'core.autocrlf overrides core.eol' means given that we have the following statement in core.eol docs:
> > "Sets the line ending type to use in the working directory for files that have the text property set when core.autocrlf is false".
> > I would like to know which line endings I'm supposed to get in the working tree if I have core.autocrlf=false and '* text=auto' in .gitattributes on windows. I get CRLFs which is consistent with the last quote but I don't understand what 'core.autocrlf overrides core.eol' means in this case.
> > Links:
> > https://git-scm.com/docs/git-config#git-config-coreeol
> > https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in
Given your .gitattributes file, you will get:
core.autocrlf=false core.eol=CRLF gives CRLF
core.autocrlf=false core.eol=LF gives LF
core.autocrlf=false core.eol=native gives CRLF under Windows, LF everywhere else
core.autocrlf=true gives CRLF (regardless of core.eol)
Does this help ?