From d21c1537b7052aa24ec56434b821fee67de33a83 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 20 Jan 2014 14:30:11 +0000 Subject: bitbake: fetch2/git: Anchor names when using ls-remote When specifying tags, they're searched for unanchored so foo/bar could match: refs/heads/abc/foo/bar refs/heads/xyz/foo/bar refs/heads/foo/bar This change anchors the expressions so they are based against heads or tags (or any other base level tree that has been created). (Bitbake rev: df2e0972cd1db7abd5ec8b7cb295fb0c42e284a4) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 cae165316c..d73f0cbecf 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -326,8 +326,8 @@ class Git(FetchMethod): else: username = "" - cmd = "%s ls-remote %s://%s%s%s %s" % \ - (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name]) + cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \ + (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name], ud.unresolvedrev[name]) if ud.proto.lower() != 'file': bb.fetch2.check_network_access(d, cmd) output = runfetchcmd(cmd, d, True) -- cgit v1.2.3-54-g00ecf