mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 23:02:22 +02:00
bitbake: lib/bb/tests/fetch.py: set initial branch
If you have a host where the git config for initial branch name is something else than 'master' the unittest will fail as they assume the default branch name is 'master'. Fix this by explicitly set the intial branch name at 'git init'. (Bitbake rev: 5bcd213c23da30a84baba88b775b1740e6bb77d0) Signed-off-by: Peter Bergin <peter.bergin@windriver.com> Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
222c5668a6
commit
5c3b6b6fd1
@@ -424,6 +424,10 @@ class FetcherTest(unittest.TestCase):
|
||||
|
||||
def git_init(self, cwd=None):
|
||||
self.git('init', cwd=cwd)
|
||||
# Explicitly set initial branch to master as
|
||||
# a common setup is to use other default
|
||||
# branch than master.
|
||||
self.git(['checkout', '-b', 'master'], cwd=cwd)
|
||||
if not self.git(['config', 'user.email'], cwd=cwd):
|
||||
self.git(['config', 'user.email', 'you@example.com'], cwd=cwd)
|
||||
if not self.git(['config', 'user.name'], cwd=cwd):
|
||||
|
||||
Reference in New Issue
Block a user