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>2014-11-06 16:45:22 +0000
commitbc6330cb7f288e76209410b0812aff1dbfa90950 (patch)
tree9b4dc7f1a98c19178e8183036fca5b4d232b73c7 /bitbake/lib/bb/fetch2/git.py
parent5fa2ce07736ae8a4a9b87c1932809fa1526e5dac (diff)
downloadpoky-bc6330cb7f288e76209410b0812aff1dbfa90950.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: 268e9c0c6830e8e621c418f20c2ca12dc840e48b) 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