Skip to content

Commit

Permalink
fix(git): make sure we properly fetch git submodules. Fixes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 21, 2022
1 parent a39d37b commit 7f6f31d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ M.clone = {
self.plugin.url,
"--filter=blob:none",
"--recurse-submodules",
"--also-filter-submodules",
"--single-branch",
"--shallow-submodules",
"--no-checkout",
"--progress",
}

Expand Down Expand Up @@ -117,7 +116,6 @@ M.fetch = {
local args = {
"fetch",
"--recurse-submodules",
"--update-shallow",
"--progress",
}

Expand Down Expand Up @@ -157,8 +155,8 @@ M.checkout = {
end

-- dont run checkout if target is already reached.
-- unless we just clones, since then we won't have any data yet
if not self.plugin._.cloned and info.commit == target.commit and info.branch == target.branch then
-- unless we just cloned, since then we won't have any data yet
if info.commit == target.commit and info.branch == target.branch then
self.plugin._.updated = {
from = info.commit,
to = info.commit,
Expand All @@ -169,6 +167,7 @@ M.checkout = {
local args = {
"checkout",
"--progress",
"--recurse-submodules",
}

if lock then
Expand Down

0 comments on commit 7f6f31d

Please sign in to comment.