tests: Make ReviewableBranchTests.test_smoke work with git < 2.28.0

Bug: https://crbug.com/gerrit/14380
Change-Id: Id015bd98b008e1530ada2c7e4332c67e8e208e25
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303325
Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Peter Kjellerstedt 2021-04-12 23:25:55 +02:00 committed by Mike Frysinger
parent 233badcdd1
commit b8bf291ddb

View File

@ -46,7 +46,7 @@ def TempGitTree():
templatedir = tempfile.mkdtemp(prefix='.test-template') templatedir = tempfile.mkdtemp(prefix='.test-template')
with open(os.path.join(templatedir, 'HEAD'), 'w') as fp: with open(os.path.join(templatedir, 'HEAD'), 'w') as fp:
fp.write('ref: refs/heads/main\n') fp.write('ref: refs/heads/main\n')
cmd += ['--template=', templatedir] cmd += ['--template', templatedir]
subprocess.check_call(cmd, cwd=tempdir) subprocess.check_call(cmd, cwd=tempdir)
yield tempdir yield tempdir
finally: finally: