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

Function get_current_branch

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

Source from the content-addressed store, hash-verified

94
95
96def get_current_branch(cwd: str | None = None) -> str | None:
97 result = _run_git_ok(["rev-parse", "--abbrev-ref", "HEAD"], cwd)
98 return result or None
99
100
101def get_default_branch(cwd: str | None = None) -> str:

Callers 2

test_get_branchMethod · 0.90

Calls 1

_run_git_okFunction · 0.85

Tested by 2

test_get_branchMethod · 0.72