All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make git fetch run with -f so rebased branches don't fail
@ 2011-09-27 21:41 Matthew McClintock
  2011-10-03 10:47 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew McClintock @ 2011-09-27 21:41 UTC (permalink / raw)
  To: bitbake-devel

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

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
This seems to fix the issue when building against our internal trees
which are constantly rebased wrt to git fetch throwing errors if a
non fast-forward-able branch is found

 lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index fb6125c..87a35d9 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -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)
-- 
1.7.6.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-03 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 21:41 [PATCH] Make git fetch run with -f so rebased branches don't fail Matthew McClintock
2011-10-03 10:47 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.