diff options
author | 2018-02-19 21:27:14 -0500 | |
---|---|---|
committer | 2018-02-19 21:27:36 -0500 | |
commit | f9a259f9f4b69644eed30f46955b77aaf2aa97fc (patch) | |
tree | 9413c7361c3fa768f7e161d3a4cfb7203a9b360f | |
parent | grs/Synchronize.py: update tracking the remote branch (diff) | |
download | grss-f9a259f9f4b69644eed30f46955b77aaf2aa97fc.tar.gz grss-f9a259f9f4b69644eed30f46955b77aaf2aa97fc.tar.bz2 grss-f9a259f9f4b69644eed30f46955b77aaf2aa97fc.zip |
grs/Synchronize.py: improve 'git submodule update' command
-rw-r--r-- | grs/Synchronize.py | 7 |
1 files changed, 2 insertions, 5 deletions
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) |