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): """ Compute the HEAD revision for the url """ - search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name]) + if ud.unresolvedrev[name][:5] == "refs/": + search = "%s %s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name]) + else: + search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name]) output = self._lsremote(ud, d, search) return output.split()[0] |