pub fn parse_text_unset(
output: &[u8],
asked: &[Vec<u8>],
paths: &[&[u8]],
) -> Result<Vec<Vec<u8>>, CandidateError>Expand description
What:
Parse the -z output of git check-attr text for the paths asked about,
and return the asked paths whose value is unset.
asked holds the arguments given to Git (the top level and the path),
paths the candidate pathnames in the same order.
Why:
Each record is three NUL-terminated fields,
path, attribute name and value,
in the order asked.
Only the exact value unset preserves a file:
set, auto, unspecified and any other value leave it checked.
A record that does not match what was asked is an error,
never a default to text or to binary.
In TS you’d write (pseudocode):
function parseTextUnset(output: Buffer, asked: Buffer[], paths: Buffer[]): Buffer[]; // throws CandidateError