summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/git.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index b4b9368d14..c323309684 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -101,6 +101,8 @@ class Git(FetchMethod):
101 101
102 ud.rebaseable = ud.parm.get("rebaseable","0") == "1" 102 ud.rebaseable = ud.parm.get("rebaseable","0") == "1"
103 103
104 ud.nobranch = ud.parm.get("nobranch","0") == "1"
105
104 # bareclone implies nocheckout 106 # bareclone implies nocheckout
105 ud.bareclone = ud.parm.get("bareclone","0") == "1" 107 ud.bareclone = ud.parm.get("bareclone","0") == "1"
106 if ud.bareclone: 108 if ud.bareclone:
@@ -289,8 +291,13 @@ class Git(FetchMethod):
289 return True 291 return True
290 292
291 def _contains_ref(self, ud, d, name): 293 def _contains_ref(self, ud, d, name):
292 cmd = "%s branch --contains %s --list %s 2> /dev/null | wc -l" % ( 294 cmd = ""
293 ud.basecmd, ud.revisions[name], ud.branches[name]) 295 if ud.nobranch:
296 cmd = "%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (
297 ud.basecmd, ud.revisions[name])
298 else:
299 cmd = "%s branch --contains %s --list %s 2> /dev/null | wc -l" % (
300 ud.basecmd, ud.revisions[name], ud.branches[name])
294 try: 301 try:
295 output = runfetchcmd(cmd, d, quiet=True) 302 output = runfetchcmd(cmd, d, quiet=True)
296 except bb.fetch2.FetchError: 303 except bb.fetch2.FetchError: