lib/bb/tests/fetch.py: set initial branch
PATCH v2 1/1 lib/bb/tests/fetch.py: set initial branch
From: "Bergin, Peter" <[email protected]>
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'.
Signed-off-by Peter Bergin <[email protected]>
Signed-off-by Peter Bergin <[email protected]>
--- lib/bb/tests/fetch.py | 4 ++++ 1 file changed, 4 insertions(+)
lib/bb/tests/fetch.py +4 -0
@@ -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', '[email protected]'], cwd=cwd) if not self.git(['config', 'user.name'], cwd=cwd):
Signature · 1 line
2.34.1