aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-20 14:30:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-20 20:39:41 +0000
commitdf2e0972cd1db7abd5ec8b7cb295fb0c42e284a4 (patch)
tree365f79e46aead8af51695f19a6827dd37b8b7e9d /lib/bb/fetch2/git.py
parent0c1bb7c0fce7b0f334311a2893ccb00385fa8d55 (diff)
downloadbitbake-df2e0972cd1db7abd5ec8b7cb295fb0c42e284a4.tar.gz
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). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/git.py')
-rw-r--r--lib/bb/fetch2/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index cae165316..d73f0cbec 100644
--- a/lib/bb/fetch2/git.py
+++ b/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)