From 1670f11b1d4a7988df30e44c1e5a27e2221cff21 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 10 Oct 2021 10:42:56 +0200 Subject: [PATCH] Try to fix to not assume master. --- cdist | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cdist b/cdist index 88c9bd4..89aa0fa 100755 --- a/cdist +++ b/cdist @@ -1015,11 +1015,8 @@ class Tree(object): 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)) - spec = self.specifier - if spec is None: - spec = 'master' - - command('git checkout %s %s %s' % (flags, spec, redirect)) + if self.specifier is not None: + command('git checkout %s %s %s' % (flags, self.specifier, redirect)) self.git_commit = command_and_read('git rev-parse --short=7 HEAD')[0].strip() self.cscript = {} -- 2.30.2