[bitbake-devel] fetch2/git: Dereference unresolved names with ls-remote

Submitted by Richard Purdie on Jan. 20, 2014, 3:21 p.m. | Patch ID: 65275


Message ID 1390231273.874.36.camel@ted
State New
Headers show

Commit Message

Richard Purdie Jan. 20, 2014, 3:21 p.m.
We need to deference names 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@linuxfoundation.org>

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index cae1653..ed55f43 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -326,7 +326,7 @@  class Git(FetchMethod):
             username = ""
-        cmd = "%s ls-remote %s://%s%s%s %s" % \
+        cmd = "%s ls-remote %s://%s%s%s %s^{}" % \
               (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name])
         if ud.proto.lower() != 'file':
             bb.fetch2.check_network_access(d, cmd)