From 205f5af1d4ea99bf204322e65901deabf20c6de7 Mon Sep 17 00:00:00 2001 From: JL102 Date: Thu, 28 Sep 2023 14:57:19 -0400 Subject: [PATCH] Rename force_autocrlf to override_autocrlf for clarity --- lua/lazy/core/config.lua | 2 +- lua/lazy/manage/task/git.lua | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 87131dd..bba8696 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -32,7 +32,7 @@ M.defaults = { -- 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, + override_autocrlf = true, }, dev = { -- directory where you store your local plugin projects diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index 342eccf..bdca7b7 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -67,12 +67,15 @@ M.clone = { self.plugin.url, } - vim.print("force_autocrlf = " .. tostring(Config.options.git.force_autocrlf)) - if Config.options.git.filter then args[#args + 1] = "--filter=blob:none" end + if Config.options.git.override_autocrlf == true then + args[#args + 1] = "-c" + args[#args + 1] = "core.autocrlf=false" + end + if self.plugin.submodules ~= false then args[#args + 1] = "--recurse-submodules" end