e2e: Add caching to git repositories
It's very expensive to create new repositories from scratch. To avoid this, a new repo & remotes are only created if necessary (depending on a cache key given on request). If not created, they are simply copied from a stored, clean repository / remote.
This commit is contained in:
@@ -14,7 +14,7 @@ import git
|
||||
@pytest.mark.parametrize("has_changes", [True, False])
|
||||
@pytest.mark.parametrize("stash", [True, False])
|
||||
def test_worktree_rebase(pull, rebase, ffable, has_changes, stash):
|
||||
with TempGitRepositoryWorktree() as (base_dir, _root_commit):
|
||||
with TempGitRepositoryWorktree.get(funcname()) as (base_dir, _root_commit):
|
||||
with open(os.path.join(base_dir, "grm.toml"), "w") as f:
|
||||
f.write('persistent_branches = ["mybasebranch"]')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user