mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-15 13:16:29 +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:
parent
ec6852a8d7
commit
3922175af1
@ -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"))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user