()
| 47 | |
| 48 | |
| 49 | def 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 | |
| 58 | def sanitize_permissions(root: Path) -> None: |