INNER CODE UNIT · Python
Mismatch
pineforge-4pass/pineforge-engine · benchmarks/check_provenance.py:73
class Mismatch(Exception):
"""The sources contradict the README beyond one number."""
class Tree:
"""The repository's files: the working tree (tracked files only) or commit ``rev``."""
def __init__(self, rev: str | None = None):
self.rev = rev
self.reads: list[str] = []
self._read: dict[str, bytes] = {}
def _git(self, *args: str, text: bool = True) -> subprocess.CompletedProcess:
return subprocess.run(["git", "-C", str(REPO), *args], capture_output=True, text=text)
def bytes(self, path: str) -> bytes:
self.reads.append(path)
if path not in self._read: