Re: Why doesn't git core.eol=lf work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> But now to the real stuff:
> It may be that your file had been commited with LF or mixed CRLF into the repo.
> In this case will Git not change CRLF into LF at checkout.
> What does
> git ls-files --eol license_header.txt
> give you ?


$ git ls-files --eol license_header.txt
i/crlf  w/crlf  attr/                   license_header.txt


 
> Beside that, I would recommend to set up a .gitatrributes file
> and add it to the repo.
> echo "* text=auto" >.gitattributes
> 
> git add --renormalize .
> git commit -m "Normalize line endings"

I am building a tool to analyze codebases, such as which function is moved from one file to another. Different line endings fail string equality.

Admittedly I can make a local commit to normalize all files. But it's best if a simple config `core.eol` can work.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux