bitbake/fetch2/git: Ensure we prune origin to remove stale branches

Thanks to Bruce Ashfield for the tip.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-05 14:16:45 +01:00
parent 0fdcc509c5
commit 96810cade0
1 changed files with 1 additions and 0 deletions

View 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)