]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
test_util.git_repository: Create main branch 1757/head
authorZack Cerza <zack@cerza.org>
Tue, 24 May 2022 20:20:21 +0000 (14:20 -0600)
committerZack Cerza <zack@cerza.org>
Tue, 24 May 2022 20:21:18 +0000 (14:21 -0600)
(if necessary)

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/suite/test/test_util.py

index d4c8541f5d0b03e76baf14214f88ab177763d3e4..d1ac74048ed07270d2e4be7f9991338246374f82 100644 (file)
@@ -37,6 +37,7 @@ def git_repository(request):
     git config user.name 'Your Name'
     git add A
     git commit -m 'A' A
+    git rev-parse --abbrev-ref main || git checkout -b main
     """.format(d=d))
 
     def fin():