pub fn mode_from_git(text: &[u8]) -> Option<CandidateMode>Expand description
What:
Map Git’s six-digit mode text to a candidate mode.
b"100644" is a byte-string literal,
compared with == byte for byte.
Why:
Any other mode (a directory 040000,
the absent side 000000) cannot be a
candidate;
the caller reports it instead of guessing.
In TS you’d write (pseudocode):
function modeFromGit(text: string): CandidateMode | undefined;