I am checking out a third party project "libjpeg" from https://github.com/winlibs/libjpeg on Linux (it is just one example, actually I have the same problem with many other projects as well). I have the following Git line endings configuration.
I have only global settings configured (set to checkout with LF line endings):
$ git config --system -l | grep core
core.eol=lf
core.autocrlf=false
$ git config --global -l | grep core
core.eol=lf
core.autocrlf=false
There are no local (repo) settings regarding line endings.
I read this article about the Git line endings configuration: https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line and I think that my configuration should give me LF for all text files on Linux. However it does not work. I get CRLF instead in my workspace. For example:
~/gitclonetest/libjpeg$ file libjpeg.map
libjpeg.map: ASCII text, with CRLF line terminators
~/gitclonetest/libjpeg$ cat -v libjpeg.map
LIBJPEG_9.0 {^M
global:^M
*;^M
};^M
Can someone help me to understand what I am missing? My goal is to have all text files (for any project) automatically be converted to LF when I clone it on Linux host.
UPDATE: The goal is to configure Git to check out on Linux host with LF even if then file was stored with CRLF in the repository.