(path: str, length: int = 12)
| 70 | |
| 71 | |
| 72 | def _file_sha256_prefix(path: str, length: int = 12) -> str: |
| 73 | h = hashlib.sha256() |
| 74 | with open(path, "rb") as f: |
| 75 | for chunk in iter(lambda: f.read(8192), b""): |
| 76 | h.update(chunk) |
| 77 | return h.hexdigest()[:length] |
| 78 | |
| 79 | |
| 80 | def _git_run(args: list[str]) -> subprocess.CompletedProcess[str]: |
no outgoing calls
no test coverage detected