add force_autocrlf setting & some tests

This commit is contained in:
JL102 2023-09-28 14:08:15 -04:00
commit a80eafb5ac
2 changed files with 7 additions and 0 deletions

View file

@ -28,6 +28,11 @@ M.defaults = {
-- then set the below to false. This should work, but is NOT supported and will -- then set the below to false. This should work, but is NOT supported and will
-- increase downloads a lot. -- increase downloads a lot.
filter = true, filter = true,
-- If git config --global core.autocrlf is true on a Unix/Linux system, then the git clone
-- process will lead to files with CRLF endings. Vi / vim / neovim cannot handle this.
-- When true, Lazy will force git to clone with core.autocrlf=false. When false, Lazy will
-- not touch the core.autocrlf setting.
force_autocrlf = true,
}, },
dev = { dev = {
-- directory where you store your local plugin projects -- directory where you store your local plugin projects

View file

@ -67,6 +67,8 @@ M.clone = {
self.plugin.url, self.plugin.url,
} }
vim.print("force_autocrlf = " .. tostring(Config.options.git.force_autocrlf))
if Config.options.git.filter then if Config.options.git.filter then
args[#args + 1] = "--filter=blob:none" args[#args + 1] = "--filter=blob:none"
end end