summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Svensson <fredrik.svensson@axis.com>2014-11-04 12:29:32 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-07-26 10:13:53 -0300
commitc7274af1debbfa938edbbe67ea1cedd9a3d8253d (patch)
tree9f2d5af4b9b7798aef582462368db7f0ce4c68fc
parentf7caae9101f6eb14c1be993334bdc96a210c717a (diff)
downloadtizen-distro-c7274af1debbfa938edbbe67ea1cedd9a3d8253d.tar.gz
tizen-distro-c7274af1debbfa938edbbe67ea1cedd9a3d8253d.tar.bz2
tizen-distro-c7274af1debbfa938edbbe67ea1cedd9a3d8253d.zip
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-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):
"""
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]