pub fn read_version_text(
directory: &Path,
identity: &BinaryIdentity,
) -> Option<Vec<u8>>Expand description
What:
The git version text recorded for exactly this identity,
or None for a missing,
foreign,
unreadable or stale entry.
Why:
Anything but an exact match of the whole identity line is stale,
and the caller then asks Git.
In TS you’d write (pseudocode):
const file = await readFile(cacheFile(dir, identity)); return file.startsWith(TAG + identity.text + '\n') ? file.slice(...) : undefined;