]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch/git: Ensure fullclone repositories are fully fetched
authorRichard Purdie <rpurdie@linux.intel.com>
Tue, 19 Oct 2010 16:17:41 +0000 (17:17 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 19 Oct 2010 16:17:41 +0000 (17:17 +0100)
The git fetcher was failing to pull in new branches into a git
repository mirror tarball as the git fetch command being used didn't
add new remote branches.

This patch uses "git fetch --all" for fullclones to ensure any
new remote branches are cloned correctly.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/fetch/git.py

index 33e9a95baf9c3f04332dc1136ca91bd82726c84e..9bd447ff8bce4bd06e794e388a895b6c0febcc9d 100644 (file)
@@ -141,7 +141,10 @@ class Git(Fetch):
         if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm:
             # Remove all but the .git directory
             runfetchcmd("rm * -Rf", d)
-            runfetchcmd("%s fetch %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.branch), d)
+            if 'fullclone' in ud.parm:
+                runfetchcmd("%s fetch --all" % (ud.basecmd), d)
+            else:
+                runfetchcmd("%s fetch %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.branch), d)
             runfetchcmd("%s fetch --tags %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d)
             runfetchcmd("%s prune-packed" % ud.basecmd, d)
             runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d)