diff options
author | Valentin David <valentin.david@codethink.co.uk> | 2019-05-10 14:34:04 +0200 |
---|---|---|
committer | Valentin David <valentin.david@codethink.co.uk> | 2019-05-10 14:34:04 +0200 |
commit | 7f9dc4c84042d89bd3a3fc45a6b65ba4ccc8d338 (patch) | |
tree | 0a2c0d43f63acce404d0526dcb8d050211ce716d | |
parent | cc871d37500cc78d16112cf31bf32685c3b7e9aa (diff) | |
download | buildstream-valentindavid/git-get-ref-warnings.tar.gz |
buildstream/_gitsourcebase.py: Fix return of get_ref() when no ref is availablevalentindavid/git-get-ref-warnings
That was causing invalid warning. Fixes #1020.
-rw-r--r-- | buildstream/_gitsourcebase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_gitsourcebase.py b/buildstream/_gitsourcebase.py index 7d07c56cb..38c844c6a 100644 --- a/buildstream/_gitsourcebase.py +++ b/buildstream/_gitsourcebase.py @@ -469,7 +469,10 @@ class _GitSourceBase(Source): self.mirror.tags = self._load_tags(node) def get_ref(self): - return self.mirror.ref, self.mirror.tags + if self.mirror.ref: + return self.mirror.ref, self.mirror.tags + else: + return None def set_ref(self, ref_data, node): if not ref_data: |