Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
91
def
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
96
def
get_current_branch(cwd: str | None = None) -> str | None:
Callers
4
run
Method · 0.90
build_memory_options
Function · 0.90
test_valid_repo
Method · 0.90
test_not_a_repo
Method · 0.90
Calls
1
_run_git_ok
Function · 0.85
Tested by
2
test_valid_repo
Method · 0.72
test_not_a_repo
Method · 0.72