From 3922175af180b1bd21f9cab0ffef2bb2d854cd8f Mon Sep 17 00:00:00 2001 From: Fredrik Erlandsson Date: Mon, 11 Jan 2021 15:21:09 +0100 Subject: [PATCH] Update git to support updates of submodules (#2378) * Update git to support updates of submodules * Remove unnecessary-comprehension * prefix with ** --- supervisor/store/git.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/supervisor/store/git.py b/supervisor/store/git.py index 2c33e0c6f..58718fd81 100644 --- a/supervisor/store/git.py +++ b/supervisor/store/git.py @@ -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"))