Fix: stable issue with corrupt git repository / submodule (#2452)

This commit is contained in:
Pascal Vizeli
2021-01-19 14:21:27 +01:00
committed by GitHub
parent 9ecd03db0e
commit db3fc1421c

View File

@@ -164,16 +164,16 @@ class GitRepo(CoreSysAttributes):
)
# Update submodules
for submodule in self.repo.submodules:
await self.sys_run_in_executor(
ft.partial(
submodule.update,
**{
"recursive": False,
"init": True,
},
)
await self.sys_run_in_executor(
ft.partial(
self.repo.git.submodule,
"update",
"--init",
"--recursive",
"--depth",
"1",
)
)
# Cleanup old data
await self.sys_run_in_executor(ft.partial(self.repo.git.clean, "-xdf"))