All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake: fetch2/git: add nobranch option for SRC_URI to skip validating SHA
@ 2014-01-07  3:21 Zhenhua Luo
  2014-01-07  8:34 ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenhua Luo @ 2014-01-07  3:21 UTC (permalink / raw)
  To: bitbake-devel; +Cc: b43082, b40290, b40527

For rebased git tree, some commits can be found in tag rather than branch, the change
is useful for such case.

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 lib/bb/fetch2/git.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index b4b9368..6d74dbb 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -101,6 +101,8 @@ class Git(FetchMethod):
 
         ud.rebaseable = ud.parm.get("rebaseable","0") == "1"
 
+        ud.nobranch = ud.parm.get("nobranch","0") == "1"
+
         # bareclone implies nocheckout
         ud.bareclone = ud.parm.get("bareclone","0") == "1"
         if ud.bareclone:
@@ -217,7 +219,7 @@ class Git(FetchMethod):
             ud.repochanged = True
         os.chdir(ud.clonedir)
         for name in ud.names:
-            if not self._contains_ref(ud, d, name):
+            if not ud.nobranch and not self._contains_ref(ud, d, name):
                 raise bb.fetch2.FetchError("Unable to find revision %s in branch %s even from upstream" % (ud.revisions[name], ud.branches[name]))
 
     def build_mirror_data(self, ud, d):
-- 
1.8.4.2




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

end of thread, other threads:[~2014-01-07 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07  3:21 [PATCH] bitbake: fetch2/git: add nobranch option for SRC_URI to skip validating SHA Zhenhua Luo
2014-01-07  8:34 ` Martin Jansa
2014-01-07 10:47   ` zhenhua.luo

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.