From bc6330cb7f288e76209410b0812aff1dbfa90950 Mon Sep 17 00:00:00 2001 From: Fredrik Svensson Date: Tue, 4 Nov 2014 12:29:32 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/fetch2/git.py') 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] -- cgit v1.2.3-54-g00ecf