From c6a43954d253842cf104b994ed20cbdb2ae8aee3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 5 Dec 2019 09:09:57 +0100 Subject: [PATCH] Make it possible to ignore submodules. --- cdist | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cdist b/cdist index 5ad37a0..8a1b3c4 100755 --- a/cdist +++ b/cdist @@ -889,14 +889,17 @@ class Tree(object): command('git checkout %s %s %s' % (flags, spec, redirect)) self.git_commit = command_and_read('git rev-parse --short=7 HEAD')[0].strip() - command('git submodule init --quiet') - command('git submodule update --quiet') proj = '%s/src/%s' % (target.directory, self.name) self.cscript = {} exec(open('%s/cscript' % proj).read(), self.cscript) + # cscript can include submodules = False to stop submodules being fetched + if not 'submodules' in self.cscript or self.cscript['submodules'] == True: + command('git submodule init --quiet') + command('git submodule update --quiet') + if os.path.exists('%s/wscript' % proj): v = read_wscript_variable(proj, "VERSION"); if v is not None: -- 2.30.2