aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2018-02-19 21:27:14 -0500
committerAnthony G. Basile <blueness@gentoo.org>2018-02-19 21:27:36 -0500
commitf9a259f9f4b69644eed30f46955b77aaf2aa97fc (patch)
tree9413c7361c3fa768f7e161d3a4cfb7203a9b360f
parentgrs/Synchronize.py: update tracking the remote branch (diff)
downloadgrss-master.zip
grss-master.tar.gz
grss-master.tar.bz2
grs/Synchronize.py: improve 'git submodule update' commandHEADmaster
-rw-r--r--grs/Synchronize.py7
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)