summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-11 18:14:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-13 19:58:19 +0100
commit740c58d43cfb1445dd126e4827bb70ce988ca107 (patch)
treea995bc79d60ef4e8f76f31880a3b43d3e3df4904 /lib/bb/fetch2/git.py
parent2995b8d551e0532eca20f8862730acd062c608ad (diff)
downloadbitbake-740c58d43cfb1445dd126e4827bb70ce988ca107.tar.gz
bitbake/fetch2/git: Don't set the branch name to None, that makes no sense
With floating revisions and no specified branch, the fetcher could fail with some obtuse errors. This was due to the branch name being set to None which makes no sense. This patch reworks some conditions to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/git.py')
-rw-r--r--lib/bb/fetch2/git.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index bcc0da583..5efdfa9ca 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -123,7 +123,8 @@ class Git(FetchMethod):
for name in ud.names:
# Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
- ud.branches[name] = ud.revisions[name]
+ if ud.revisions[name]:
+ ud.branches[name] = ud.revisions[name]
ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.'))