From 96810cade04cad44d70a7c6e51aacdf89caef92b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 5 Feb 2011 14:16:45 +0100 Subject: [PATCH] bitbake/fetch2/git: Ensure we prune origin to remove stale branches Thanks to Bruce Ashfield for the tip. Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 9f79d47762..ec20d262a8 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -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)