MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _git_workspace_with_worktree

Function _git_workspace_with_worktree

tests/test_detect.py:4690–4700  ·  view source on GitHub ↗

ws/ holding a repo and a linked worktree of it as siblings (#4683).

(tmp_path)

Source from the content-addressed store, hash-verified

4688
4689
4690def _git_workspace_with_worktree(tmp_path):
4691 """ws/ holding a repo and a linked worktree of it as siblings (#4683)."""
4692 ws = tmp_path / "ws"
4693 app = ws / "app"
4694 (app / "src").mkdir(parents=True)
4695 _git(app, "init", "-q")
4696 (app / "src" / "a.py").write_text("x = 1\n")
4697 _git(app, "add", ".")
4698 _git(app, "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-q", "-m", "init")
4699 _git(app, "worktree", "add", "-q", str(ws / "app-feature"))
4700 return ws, app, ws / "app-feature"
4701
4702
4703@pytest.mark.skipif(shutil.which("git") is None, reason="needs git")

Calls 1

_gitFunction · 0.70

Tested by

no test coverage detected