fix(git): make sure we properly fetch git submodules. Fixes #72

This commit is contained in:
Folke Lemaitre 2022-12-21 23:13:18 +01:00
parent a39d37b51a
commit 7f6f31d66f
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 4 additions and 5 deletions

View File

@ -57,9 +57,8 @@ M.clone = {
self.plugin.url, self.plugin.url,
"--filter=blob:none", "--filter=blob:none",
"--recurse-submodules", "--recurse-submodules",
"--also-filter-submodules",
"--single-branch", "--single-branch",
"--shallow-submodules",
"--no-checkout",
"--progress", "--progress",
} }
@ -117,7 +116,6 @@ M.fetch = {
local args = { local args = {
"fetch", "fetch",
"--recurse-submodules", "--recurse-submodules",
"--update-shallow",
"--progress", "--progress",
} }
@ -157,8 +155,8 @@ M.checkout = {
end end
-- dont run checkout if target is already reached. -- dont run checkout if target is already reached.
-- unless we just clones, since then we won't have any data yet -- unless we just cloned, 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 if info.commit == target.commit and info.branch == target.branch then
self.plugin._.updated = { self.plugin._.updated = {
from = info.commit, from = info.commit,
to = info.commit, to = info.commit,
@ -169,6 +167,7 @@ M.checkout = {
local args = { local args = {
"checkout", "checkout",
"--progress", "--progress",
"--recurse-submodules",
} }
if lock then if lock then