diff --git a/tests/vcs/git/conftest.py b/tests/vcs/git/conftest.py index 6e0c08dbb5f..7c1004fec82 100644 --- a/tests/vcs/git/conftest.py +++ b/tests/vcs/git/conftest.py @@ -15,7 +15,7 @@ @pytest.fixture() def temp_repo(tmp_path: Path) -> TempRepoFixture: """Temporary repository with 2 commits""" - repo = dulwich.repo.Repo.init(str(tmp_path)) + repo = dulwich.repo.Repo.init(str(tmp_path), default_branch=b"main") worktree = repo.get_worktree() # init commit diff --git a/tests/vcs/git/test_backend.py b/tests/vcs/git/test_backend.py index 5b242c1b75f..a0c885e7f1e 100644 --- a/tests/vcs/git/test_backend.py +++ b/tests/vcs/git/test_backend.py @@ -276,7 +276,7 @@ def test_clone_existing_locked_tag(tmp_path: Path, temp_repo: TempRepoFixture) - Git.clone(url=source_url, source_root=source_root_dir, name="clone-test") expected_short = ( - f"Failed to clone {source_url} at 'refs/heads/master'," + f"Failed to clone {source_url} at 'refs/heads/main'," f" unable to acquire file lock for {tag_ref}." ) assert str(exc_info.value) == expected_short