]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch2/git: Ensure we prune origin to remove stale branches
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 5 Feb 2011 13:16:45 +0000 (14:16 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 5 Feb 2011 15:43:36 +0000 (15:43 +0000)
Thanks to Bruce Ashfield for the tip.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/git.py

index 9f79d47762dcb98e2e0c4e480f815f42ed7e2eed..ec20d262a8f6d01ba79086b86d98a5de8ed3584d 100644 (file)
@@ -127,6 +127,7 @@ class Git(Fetch):
                 needupdate = True
         if needupdate:
             bb.fetch2.check_network_access(d, "git fetch %s%s" % (ud.host, ud.path))
+            runfetchcmd("%s remote prune origin" % ud.basecmd, d)
             runfetchcmd("%s remote rm origin" % ud.basecmd, d)
             runfetchcmd("%s remote add origin %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d)
             runfetchcmd("%s fetch --all -t" % ud.basecmd, d)