(path: Path)
| 236 | |
| 237 | |
| 238 | def index_has_file(path: Path) -> bool: |
| 239 | result = subprocess.run( |
| 240 | ["git", "cat-file", "-e", f":{path.as_posix()}"], |
| 241 | check=False, |
| 242 | stdout=subprocess.PIPE, |
| 243 | stderr=subprocess.PIPE, |
| 244 | ) |
| 245 | return result.returncode == 0 |
| 246 | |
| 247 | |
| 248 | def repo_relative(path: Path, root: Path) -> Path | None: |