diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 799fb6c0fe..66a77a8376 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
| @@ -339,7 +339,10 @@ class Git(FetchMethod): | |||
| 339 | """ | 339 | """ |
| 340 | Compute the HEAD revision for the url | 340 | Compute the HEAD revision for the url |
| 341 | """ | 341 | """ |
| 342 | search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name]) | 342 | if ud.unresolvedrev[name][:5] == "refs/": |
| 343 | search = "%s %s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name]) | ||
| 344 | else: | ||
| 345 | search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name]) | ||
| 343 | output = self._lsremote(ud, d, search) | 346 | output = self._lsremote(ud, d, search) |
| 344 | return output.split()[0] | 347 | return output.split()[0] |
| 345 | 348 | ||
