Skip to content

Commit 417081b

Browse files
committed
!squash refactor!(pytest plugin[git]) Cache git_repo
1 parent a60dafa commit 417081b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/libvcs/pytest_plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,15 @@ def hg_remote_repo(
620620

621621

622622
@pytest.fixture
623-
def git_repo(projects_path: pathlib.Path, git_remote_repo: pathlib.Path) -> GitSync:
623+
def git_repo(
624+
remote_repos_path: pathlib.Path,
625+
projects_path: pathlib.Path,
626+
git_remote_repo: pathlib.Path,
627+
) -> GitSync:
624628
"""Pre-made git clone of remote repo checked out to user's projects dir."""
625629
remote_repo_name = unique_repo_name(remote_repos_path=projects_path)
626630
new_checkout_path = projects_path / remote_repo_name
627-
master_copy = projects_path / "git_repo"
631+
master_copy = remote_repos_path / "git_repo"
628632

629633
if master_copy.exists():
630634
shutil.copytree(master_copy, new_checkout_path)

0 commit comments

Comments
 (0)