File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -620,11 +620,26 @@ 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."""
629+ remote_repo_name = unique_repo_name (remote_repos_path = projects_path )
630+ new_checkout_path = projects_path / remote_repo_name
631+ master_copy = remote_repos_path / "git_repo"
632+
633+ if master_copy .exists ():
634+ shutil .copytree (master_copy , new_checkout_path )
635+ return GitSync (
636+ url = f"file://{ git_remote_repo } " ,
637+ path = str (new_checkout_path ),
638+ )
639+
625640 git_repo = GitSync (
626641 url = f"file://{ git_remote_repo } " ,
627- path = str ( projects_path / "git_repo" ) ,
642+ path = master_copy ,
628643 remotes = {
629644 "origin" : GitRemote (
630645 name = "origin" ,
You can’t perform that action at this time.
0 commit comments