This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch bst-1
in repository https://gitbox.apache.org/repos/asf/buildstream.git


The following commit(s) were added to refs/heads/bst-1 by this push:
     new 89c0c3c3f Ensure the initial branch in git is master
     new 84df260e4 Merge pull request #1650 from nanonyme/new-git-bst-1
89c0c3c3f is described below

commit 89c0c3c3fe685d5f379c56a75886a2148741161a
Author: Seppo Yli-Olli <[email protected]>
AuthorDate: Sat May 7 22:40:51 2022 +0300

    Ensure the initial branch in git is master
    
    There's many tests depending on this all around and default
    branch is changing to main so it's better to be explicit.
---
 tests/testutils/repo/git.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py
index 1adc096dd..f14b8785e 100644
--- a/tests/testutils/repo/git.py
+++ b/tests/testutils/repo/git.py
@@ -29,6 +29,11 @@ class Git(Repo):
     def create(self, directory):
         self.copy_directory(directory, self.repo)
         subprocess.call(['git', 'init', '.'], env=GIT_ENV, cwd=self.repo)
+        subprocess.call(
+            ['git', 'checkout', '-b', 'master'],
+            env=GIT_ENV,
+            cwd=self.repo
+        )
         subprocess.call(['git', 'add', '.'], env=GIT_ENV, cwd=self.repo)
         subprocess.call(['git', 'commit', '-m', 'Initial commit'], 
env=GIT_ENV, cwd=self.repo)
         return self.latest_commit()

Reply via email to