MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / cleanup_temp_worktrees

Function cleanup_temp_worktrees

python-impl/evogit/utils/git.py:562–572  ·  view source on GitHub ↗

Remove all the worktrees in the .phylox_evaluate directory.

(config: EvoGitConfig)

Source from the content-addressed store, hash-verified

560
561
562def cleanup_temp_worktrees(config: EvoGitConfig) -> None:
563 """Remove all the worktrees in the .phylox_evaluate directory."""
564 worktree_dir = os.path.join(config.git_dir, ".phylox_evaluate")
565 if os.path.exists(worktree_dir):
566 shutil.rmtree(worktree_dir)
567
568 subprocess.run(
569 ["git", "worktree", "prune"],
570 cwd=config.git_dir,
571 check=True,
572 )
573
574
575def merge_branches(config: EvoGitConfig, commit: str) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected