diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/git.py')
| -rw-r--r-- | bitbake/lib/bb/fetch/git.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index cdd5a1090c..5984818f9e 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py | |||
| @@ -50,13 +50,14 @@ class Git(Fetch): | |||
| 50 | if 'protocol' in ud.parm: | 50 | if 'protocol' in ud.parm: |
| 51 | ud.proto = ud.parm['protocol'] | 51 | ud.proto = ud.parm['protocol'] |
| 52 | 52 | ||
| 53 | tag = data.getVar("SRCREV", d, 1) | 53 | tag = Fetch.srcrev_internal_helper(ud, d) |
| 54 | if 'tag' in ud.parm: | 54 | if tag is True: |
| 55 | ud.tag = ud.parm['tag'] | 55 | ud.tag = self.latest_revision(url, ud, d) |
| 56 | elif tag is "SRCREVINACTION": | 56 | elif tag: |
| 57 | ud.tag = self.latest_revision(url, ud, d) | 57 | ud.tag = tag |
| 58 | else: | 58 | |
| 59 | ud.tag = tag | 59 | if not ud.tag: |
| 60 | ud.tag = self.latest_revision(url, ud, d) | ||
| 60 | 61 | ||
| 61 | if ud.tag == "master": | 62 | if ud.tag == "master": |
| 62 | ud.tag = self.latest_revision(url, ud, d) | 63 | ud.tag = self.latest_revision(url, ud, d) |
| @@ -132,3 +133,5 @@ class Git(Fetch): | |||
| 132 | output = runfetchcmd("git ls-remote %s://%s%s" % (ud.proto, ud.host, ud.path), d, True) | 133 | output = runfetchcmd("git ls-remote %s://%s%s" % (ud.proto, ud.host, ud.path), d, True) |
| 133 | return output.split()[0] | 134 | return output.split()[0] |
| 134 | 135 | ||
| 136 | def _build_revision(self, url, ud, d): | ||
| 137 | return ud.tag | ||
