MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / get_repo_root

Function get_repo_root

src/utils/git.py:91–93  ·  view source on GitHub ↗
(cwd: str | None = None)

Source from the content-addressed store, hash-verified

89
90
91def get_repo_root(cwd: str | None = None) -> str | None:
92 result = _run_git_ok(["rev-parse", "--show-toplevel"], cwd)
93 return result or None
94
95
96def get_current_branch(cwd: str | None = None) -> str | None:

Callers 4

runMethod · 0.90
build_memory_optionsFunction · 0.90
test_valid_repoMethod · 0.90
test_not_a_repoMethod · 0.90

Calls 1

_run_git_okFunction · 0.85

Tested by 2

test_valid_repoMethod · 0.72
test_not_a_repoMethod · 0.72