[codeface] Re: Line endings issues

  • From: Mitchell Joblin <joblin.m@xxxxxxxxx>
  • To: Andreas Ringlstetter <andreas.ringlstetter@xxxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 22 Oct 2015 11:29:28 +0200

On Thu, Oct 22, 2015 at 8:30 AM, Andreas Ringlstetter
<andreas.ringlstetter@xxxxxxxxxxxxxxxxxxxx> wrote:

That's not making any sense to me now. What's the output of

$ git config core.autocrlf

for you?

yes, returns input.

--Mitchell

Then one last try, whats the output for core.eol ?

git config core.eol returns nothing for me. I have now set it to lf.
Not sure if that fixes things yet.

Thanks,

Mitchell


Should be "lf", but if it's set to "crlf" or "cr", that would explain
why everything gets converted to non-"lf" line endings on checkout, in
combination with the patch which added the .gitattributes file.

Also means that that file has an error in it, as R scripts apparently
shouldn't be converted at all, but LF line endings must be enforced for
these in order to function properly. text=auto isn't applicable for R
files, it should have been explicitly eol=lf for *.r and *.R, as well,
and explicit eol=crlf for *.bat.

Unfortunately, git currently does not support forced overriding of
core.eol via magic files, and text=auto is still required to ensure that
all text files are converted to LF line endings on checkin.
"* eol=lf" in .gitattributes would break all binary files, and
"* text=auto eol=lf" isn't supported yet.

So core.eol needs to be set by each developer locally.

--Andreas

Other related posts: