Fix unreference variable.
authorCarl Hetherington <cth@carlh.net>
Thu, 4 Jun 2020 18:38:53 +0000 (20:38 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 4 Jun 2020 18:38:53 +0000 (20:38 +0200)
cdist

diff --git a/cdist b/cdist
index 1aff482f92954f4cc653e8c4fe7259c1f618b2ed..682924413cc5f5001a300873ac20e38cff882ab6 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -906,6 +906,8 @@ class Tree(object):
             redirect = '>/dev/null'
         if config.has('git_reference'):
             ref = '--reference-if-able %s/%s.git' % (config.get('git_reference'), self.name)
             redirect = '>/dev/null'
         if config.has('git_reference'):
             ref = '--reference-if-able %s/%s.git' % (config.get('git_reference'), self.name)
+        else:
+            ref = ''
         command('git clone %s %s %s/%s.git %s/src/%s' % (flags, ref, config.get('git_prefix'), self.name, target.directory, self.name))
         os.chdir('%s/src/%s' % (target.directory, self.name))
 
         command('git clone %s %s %s/%s.git %s/src/%s' % (flags, ref, config.get('git_prefix'), self.name, target.directory, self.name))
         os.chdir('%s/src/%s' % (target.directory, self.name))