MCPcopy
hub / github.com/streamlit/streamlit / get_git_root

Function get_git_root

e2e_playwright/shared/git_utils.py:19–28  ·  view source on GitHub ↗

Get the root directory of the git repository.

()

Source from the content-addressed store, hash-verified

17
18
19def get_git_root() -> Path:
20 """Get the root directory of the git repository."""
21 try:
22 return Path(
23 subprocess.check_output(["git", "rev-parse", "--show-toplevel"])
24 .strip()
25 .decode("utf-8")
26 )
27 except subprocess.CalledProcessError:
28 raise RuntimeError("Not a git repository or git is not installed.")

Callers 4

output_folderFunction · 0.90
assert_snapshotFunction · 0.90
measure_performanceFunction · 0.90
_run_git_commandFunction · 0.90

Calls

no outgoing calls

Tested by 3

output_folderFunction · 0.72
assert_snapshotFunction · 0.72
_run_git_commandFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…