summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2019-11-01 11:32:17 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-11-01 11:32:17 +0000
commit66045d9c817992dbce855d4217ff00970ae7ff79 (patch)
treeeaed38728f84e41301019a0724e9b22256e91e1d
parent2bb3dc154da08be47e769b4cceabbc7fc60cbf44 (diff)
parent22483d0fbd839996617834866c24edc4c196095e (diff)
downloadbuildstream-66045d9c817992dbce855d4217ff00970ae7ff79.tar.gz
Merge branch 'bschubert/fix-git-ref' into 'master'
_gitsourcebase.py: Return 'None' when the ref is unset See merge request BuildStream/buildstream!1680
-rw-r--r--src/buildstream/_gitsourcebase.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buildstream/_gitsourcebase.py b/src/buildstream/_gitsourcebase.py
index 68eb4c2fb..120d8c72a 100644
--- a/src/buildstream/_gitsourcebase.py
+++ b/src/buildstream/_gitsourcebase.py
@@ -471,6 +471,8 @@ class _GitSourceBase(Source):
self.mirror.tags = self._load_tags(node)
def get_ref(self):
+ if self.mirror.ref is None:
+ return None
return self.mirror.ref, self.mirror.tags
def set_ref(self, ref, node):