This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch valentindavid/git-get-ref-warnings in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 7f9dc4c84042d89bd3a3fc45a6b65ba4ccc8d338 Author: Valentin David <[email protected]> AuthorDate: Fri May 10 14:34:04 2019 +0200 buildstream/_gitsourcebase.py: Fix return of get_ref() when no ref is available That was causing invalid warning. Fixes #1020. --- buildstream/_gitsourcebase.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildstream/_gitsourcebase.py b/buildstream/_gitsourcebase.py index 7d07c56..38c844c 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:
