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

Function _git_root

graphify/hooks.py:730–736  ·  view source on GitHub ↗

Walk up to find .git directory.

(path: Path)

Source from the content-addressed store, hash-verified

728
729
730def _git_root(path: Path) -> Path | None:
731 """Walk up to find .git directory."""
732 current = path.resolve()
733 for parent in [current, *current.parents]:
734 if (parent / ".git").exists():
735 return parent
736 return None
737
738
739_WINDOWS_DRIVE_RE = re.compile(r"^[A-Za-z]:[\\/]")

Callers 3

installFunction · 0.85
uninstallFunction · 0.85
statusFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected