1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-03 14:13:38 +02:00

tests: Replace 'git init -b' with 'git init' and 'git checkout -b'

This commit is contained in:
2023-10-10 08:32:57 +02:00
parent 19d1bab7b5
commit c6900f96d1

View File

@@ -11,7 +11,9 @@ class TestGitStore(unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.mkdtemp(prefix="osc_test")
os.chdir(self.tmpdir)
subprocess.check_output(["git", "init", "-b", "factory"])
# 'git init -b <initial-branch>' is not supported on older distros
subprocess.check_output(["git", "init", "-q"])
subprocess.check_output(["git", "checkout", "-b", "factory", "-q"])
subprocess.check_output(["git", "remote", "add", "origin", "https://example.com/packages/my-package.git"])
def tearDown(self):