MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / repo_root

Function repo_root

scripts/sanitize-commit.py:49–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def repo_root() -> Path:
50 try:
51 out = capture(["git", "rev-parse", "--show-toplevel"]).strip()
52 except (subprocess.CalledProcessError, FileNotFoundError):
53 print("Error: not inside a git repository.", file=sys.stderr)
54 sys.exit(1)
55 return Path(out)
56
57
58def sanitize_permissions(root: Path) -> None:

Callers 1

mainFunction · 0.85

Calls 1

captureFunction · 0.85

Tested by

no test coverage detected