@@ -281,21 +281,30 @@ def libvcs_test_cache_path(tmp_path_factory: pytest.TempPathFactory) -> pathlib.
281281
282282@pytest .fixture (scope = "session" )
283283def empty_git_repo_path (libvcs_test_cache_path : pathlib .Path ) -> pathlib .Path :
284- """Return temporary directory to use as cache path for libvcs tests ."""
284+ """Return temporary directory to use for master-copy of a git repo ."""
285285 return libvcs_test_cache_path / "empty_git_repo"
286286
287287
288+ @pytest .fixture (scope = "session" )
289+ def empty_git_bare_repo_path (libvcs_test_cache_path : pathlib .Path ) -> pathlib .Path :
290+ """Return temporary directory to use for master-copy of a bare git repo."""
291+ return libvcs_test_cache_path / "empty_git_bare_repo"
292+
293+
288294@pytest .fixture (scope = "session" )
289295@skip_if_git_missing
290296def empty_git_bare_repo (
291- empty_git_repo_path : pathlib .Path ,
297+ empty_git_bare_repo_path : pathlib .Path ,
292298) -> pathlib .Path :
293299 """Return factory to create git remote repo to for clone / push purposes."""
294- if empty_git_repo_path .exists () and (empty_git_repo_path / ".git" ).exists ():
295- return empty_git_repo_path
300+ if (
301+ empty_git_bare_repo_path .exists ()
302+ and (empty_git_bare_repo_path / ".git" ).exists ()
303+ ):
304+ return empty_git_bare_repo_path
296305
297306 return _create_git_remote_repo_full_path (
298- remote_repo_path = empty_git_repo_path ,
307+ remote_repo_path = empty_git_bare_repo_path ,
299308 remote_repo_post_init = None ,
300309 init_cmd_args = DEFAULT_GIT_REMOTE_REPO_CMD_ARGS , # --bare
301310 )
0 commit comments