commit: f9a259f9f4b69644eed30f46955b77aaf2aa97fc
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 20 02:27:14 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Feb 20 02:27:36 2018 +0000
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=f9a259f9
grs/Synchronize.py: improve 'git submodule update' command
grs/Synchronize.py | 7 ++-----
1 file 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)