1 |
commit: f9a259f9f4b69644eed30f46955b77aaf2aa97fc |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 20 02:27:14 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 20 02:27:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=f9a259f9 |
7 |
|
8 |
grs/Synchronize.py: improve 'git submodule update' command |
9 |
|
10 |
grs/Synchronize.py | 7 ++----- |
11 |
1 file changed, 2 insertions(+), 5 deletions(-) |
12 |
|
13 |
diff --git a/grs/Synchronize.py b/grs/Synchronize.py |
14 |
index be41bd6..da38285 100644 |
15 |
--- a/grs/Synchronize.py |
16 |
+++ b/grs/Synchronize.py |
17 |
@@ -50,11 +50,8 @@ class Synchronize(): |
18 |
# If there is a .gitmodules, then init/update the submodules |
19 |
git_modulesfile = os.path.join(self.local_repo, '.gitmodules') |
20 |
if os.path.isfile(git_modulesfile): |
21 |
- # This may re-init submodules, but its harmless. We need |
22 |
- # to keep trying for newly added modules. |
23 |
- cmd = 'git -C %s submodule init' % self.local_repo |
24 |
- Execute(cmd, timeout=60, logfile=self.logfile) |
25 |
- cmd = 'git -C %s submodule update --remote' % self.local_repo |
26 |
+ # Recursively update any submodules following the remote branch |
27 |
+ cmd = 'git -C %s submodule update --init --recursive --remote' % self.local_repo |
28 |
Execute(cmd, timeout=60, logfile=self.logfile) |