]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch2/git: Make git fetch run with -f so rebased branches don't fail
authorMatthew McClintock <msm@freescale.com>
Tue, 27 Sep 2011 21:41:39 +0000 (16:41 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Oct 2011 12:46:15 +0000 (13:46 +0100)
git fetches can fail (or at least return failed) when trying to
fetch and prune rebased branches. This patch simply adds a -f
to the git fetch command so these failure are ignore

Generally, if some SHA was rebased away it's not coming back so
there is no point in not doing this force

(Bitbake rev: a7b75e4db52445b30ec0fc0053dcf454f5f7d2db)

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

index fb6125ce3f513a0fc7335e7ab63db1eacebe1972..87a35d97a3e895068f1712bb8fe64b2a45c4399c 100644 (file)
@@ -190,7 +190,7 @@ class Git(FetchMethod):
                 logger.debug(1, "No Origin")
 
             runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d)
-            fetch_cmd = "%s fetch --prune %s refs/*:refs/*" % (ud.basecmd, repourl)
+            fetch_cmd = "%s fetch -f --prune %s refs/*:refs/*" % (ud.basecmd, repourl)
             bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
             runfetchcmd(fetch_cmd, d)
             runfetchcmd("%s prune-packed" % ud.basecmd, d)