summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorFredrik Svensson <fredrik.svensson@axis.com>2014-11-04 12:29:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-06 14:15:48 +0000
commitcc6d968241007fb036d7c0843020c7dae9a529d9 (patch)
tree3d331095b4e95027947603b714f85c14be0b0752 /bitbake/lib/bb/fetch2/git.py
parent74bb618474bf8aa59c39230c01fa412df5b5bd52 (diff)
downloadpoky-cc6d968241007fb036d7c0843020c7dae9a529d9.tar.gz
bitbake: fetch2/git: Allow other namespaces than refs/heads to be searched.
This makes it possble to fetch Gerrit review references which are normally stored under refs/changes. Please disregard previous patch with the same topic. (Bitbake rev: ab8cbf2a71750f5ea36e218036b050857301607b) Signed-off-by: Fredrik Svensson <fredrik.svensson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py5
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