[Patchew-devel] [PATCH] tests: set default branch name

Paolo Bonzini posted 1 patch 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20210806165844.140447-2-pbonzini@redhat.com
tests/patchewtest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[Patchew-devel] [PATCH] tests: set default branch name

Posted by Paolo Bonzini 1 month, 2 weeks ago
git allows overriding the default branch name, but the tests configure the
project in Patchew so that the default branch for the applier is "master".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/patchewtest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/patchewtest.py b/tests/patchewtest.py
index 33923d1..cc6f197 100644
--- a/tests/patchewtest.py
+++ b/tests/patchewtest.py
@@ -177,7 +177,7 @@ class PatchewTestCase(dj_test.LiveServerTestCase):
     def create_git_repo(self, name="test-repo"):
         repo = os.path.join(self.get_tmpdir(), name)
         os.mkdir(repo)
-        subprocess.check_output(["git", "init"], cwd=repo)
+        subprocess.check_output(["git", "init", "-bmaster"], cwd=repo)
         subprocess.check_output(["git", "config", "user.name", "Patchew Test"], cwd=repo)
         subprocess.check_output(["git", "config", "user.email", "test@patchew.org"], cwd=repo)
         subprocess.check_output(["touch", "foo", "bar"], cwd=repo)
-- 
2.31.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel