Skip to content

Commit

Permalink
feat(config): added option to disable git filter. NOT recommended. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 23, 2023
1 parent c32a618 commit 26a67e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lua/lazy/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ M.defaults = {
log = { "--since=3 days ago" }, -- show commits from the last 3 days
timeout = 120, -- kill processes that take more than 2 minutes
url_format = "https://github.com/%s.git",
-- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version,
-- then set the below to false. This is should work, but is NOT supported and will
-- increase downloads a lot.
filter = true,
},
dev = {
-- directory where you store your local plugin projects
Expand Down
10 changes: 8 additions & 2 deletions lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ M.clone = {
local args = {
"clone",
self.plugin.url,
"--filter=blob:none",
}

if Config.options.git.filter then
args[#args + 1] = "--filter=blob:none"
end

vim.list_extend(args, {
"--recurse-submodules",
"--progress",
}
})

if self.plugin.branch then
vim.list_extend(args, { "-b", self.plugin.branch })
Expand Down

0 comments on commit 26a67e3

Please sign in to comment.