File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -622,9 +622,20 @@ def hg_remote_repo(
622622@pytest .fixture
623623def git_repo (projects_path : pathlib .Path , git_remote_repo : pathlib .Path ) -> GitSync :
624624 """Pre-made git clone of remote repo checked out to user's projects dir."""
625+ remote_repo_name = unique_repo_name (remote_repos_path = projects_path )
626+ new_checkout_path = projects_path / remote_repo_name
627+ master_copy = projects_path / "git_repo"
628+
629+ if master_copy .exists ():
630+ shutil .copytree (master_copy , new_checkout_path )
631+ return GitSync (
632+ url = f"file://{ git_remote_repo } " ,
633+ path = str (new_checkout_path ),
634+ )
635+
625636 git_repo = GitSync (
626637 url = f"file://{ git_remote_repo } " ,
627- path = str ( projects_path / "git_repo" ) ,
638+ path = master_copy ,
628639 remotes = {
629640 "origin" : GitRemote (
630641 name = "origin" ,
You can’t perform that action at this time.
0 commit comments