You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:04:55 UTC

[buildstream] branch valentindavid/git-get-ref-warnings created (now 7f9dc4c)

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch valentindavid/git-get-ref-warnings
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 7f9dc4c  buildstream/_gitsourcebase.py: Fix return of get_ref() when no ref is available

This branch includes the following new commits:

     new 7f9dc4c  buildstream/_gitsourcebase.py: Fix return of get_ref() when no ref is available

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 01/01: buildstream/_gitsourcebase.py: Fix return of get_ref() when no ref is available

Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

github-bot 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 <va...@codethink.co.uk>
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: