From 6cfade647c0da95fc8245e20f3ed48746b3227e4 Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Wed, 5 Jun 2024 15:15:56 +0200 Subject: [PATCH] Do 'git submodule update --init' when checking out to a branch --- tom/git.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tom/git.py b/tom/git.py index b6c5ce5..4e9d634 100644 --- a/tom/git.py +++ b/tom/git.py @@ -123,6 +123,7 @@ def checkout(self, branch=None, tag=None, remote="upstream", new=False): self.run_command("checkout", branch) # ensure we're on the tip of ref self.run_command("reset", "--hard", "FETCH_HEAD") + self.run_command("submodule", "update", "--init") def get_file(self, path): """Returns contents of a file as a single string"""