From f9a259f9f4b69644eed30f46955b77aaf2aa97fc Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Mon, 19 Feb 2018 21:27:14 -0500 Subject: grs/Synchronize.py: improve 'git submodule update' command --- grs/Synchronize.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'grs') diff --git a/grs/Synchronize.py b/grs/Synchronize.py index be41bd6..da38285 100644 --- a/grs/Synchronize.py +++ b/grs/Synchronize.py @@ -50,11 +50,8 @@ class Synchronize(): # If there is a .gitmodules, then init/update the submodules git_modulesfile = os.path.join(self.local_repo, '.gitmodules') if os.path.isfile(git_modulesfile): - # This may re-init submodules, but its harmless. We need - # to keep trying for newly added modules. - cmd = 'git -C %s submodule init' % self.local_repo - Execute(cmd, timeout=60, logfile=self.logfile) - cmd = 'git -C %s submodule update --remote' % self.local_repo + # Recursively update any submodules following the remote branch + cmd = 'git -C %s submodule update --init --recursive --remote' % self.local_repo Execute(cmd, timeout=60, logfile=self.logfile) -- cgit v1.2.3-65-gdbad