1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Update git to support updates of submodules (#2378)

* Update git to support updates of submodules

* Remove unnecessary-comprehension

* prefix with **
This commit is contained in:
Fredrik Erlandsson
2021-01-11 15:21:09 +01:00
committed by GitHub
parent ec6852a8d7
commit 3922175af1

View File

@@ -159,6 +159,19 @@ class GitRepo(CoreSysAttributes):
ft.partial(self.repo.git.reset, f"origin/{branch}", hard=True)
)
# Update submodules
await self.sys_run_in_executor(
ft.partial(
self.repo.git.submodule.root.update,
**{
"recursive": False,
"init": True,
"force_remove": True,
"force_reset": True,
},
)
)
# Cleanup old data
await self.sys_run_in_executor(ft.partial(self.repo.git.clean, "-xdf"))