[bitbake-devel] [PATCH v2] fetch2/git: Dereference unresolved names with ls-remote
Richard Purdie
richard.purdie at linuxfoundation.org
Mon Jan 20 20:47:30 UTC 2014
We need to deference tags when trying to map them to commit IDs with
ls-remote. If we don't do this, a given commit might not show up
later in a specific branch. There appears to be no good reason not
to do this.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
v2: Only apply ^{} to tags, not heads
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index d73f0cb..f7c26b3 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -326,7 +326,7 @@ class Git(FetchMethod):
else:
username = ""
- cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \
+ 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)
More information about the bitbake-devel
mailing list