1
0
Fork 0
mirror of synced 2024-12-04 14:45:36 -05:00

Support testing with newer version of Git

This commit is contained in:
Tim Byrne 2023-07-08 14:28:00 -05:00
parent 2253e52ab7
commit 82ba16db34
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12
3 changed files with 9 additions and 0 deletions

View file

@ -267,6 +267,9 @@ def runner():
@pytest.fixture(scope='session')
def config_git():
"""Configure global git configuration, if missing"""
os.system(
'git config init.defaultBranch || '
'git config --global init.defaultBranch master')
os.system(
'git config user.name || '
'git config --global user.name "test"')

View file

@ -56,6 +56,8 @@ def test_init(
args.append('-f')
# run init
runner(['git', 'config', '--global', 'init.defaultBranch', 'master'],
env={'HOME': home}, cwd=cwd)
run = runner(yadm_cmd(*args), env={'HOME': home}, cwd=cwd)
if repo_present and not force:

View file

@ -22,6 +22,10 @@ def test_upgrade(tmpdir, runner, versions, submodule):
# pylint: disable=too-many-statements
home = tmpdir.mkdir('HOME')
env = {'HOME': str(home)}
runner(['git', 'config', '--global', 'init.defaultBranch', 'master'],
env=env)
runner(['git', 'config', '--global', 'protocol.file.allow', 'always'],
env=env)
if submodule:
ext_repo = tmpdir.mkdir('ext_repo')