aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap/wrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/wrap/wrap.py')
-rw-r--r--mesonbuild/wrap/wrap.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index e5d0a71..4d9d032 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -218,17 +218,16 @@ class Resolver:
def get_git(self):
revno = self.wrap.get('revision')
- if self.wrap.values.get('clone-recursive', '').lower() == 'true':
- subprocess.check_call(['git', 'clone', '--recursive', self.wrap.get('url'),
- self.directory], cwd=self.subdir_root)
- else:
- subprocess.check_call(['git', 'clone', self.wrap.get('url'),
- self.directory], cwd=self.subdir_root)
+ subprocess.check_call(['git', 'clone', self.wrap.get('url'),
+ self.directory], cwd=self.subdir_root)
if revno.lower() != 'head':
if subprocess.call(['git', 'checkout', revno], cwd=self.dirname) != 0:
subprocess.check_call(['git', 'fetch', self.wrap.get('url'), revno], cwd=self.dirname)
- subprocess.check_call(['git', 'checkout', revno],
- cwd=self.dirname)
+ subprocess.check_call(['git', 'checkout', revno], cwd=self.dirname)
+ if self.wrap.values.get('clone-recursive', '').lower() == 'true':
+ subprocess.check_call(['git', 'submodule', 'update',
+ '--init', '--checkout', '--recursive'],
+ cwd=self.dirname)
push_url = self.wrap.values.get('push-url')
if push_url:
subprocess.check_call(['git', 'remote', 'set-url',