Skip to main content

parse_commit_changes

Function parse_commit_changes 

Source
pub fn parse_commit_changes(
    output: &str,
) -> Result<Vec<LandedChange>, CaptureOrderFormatError>
Expand description

What: Parses git diff-tree --stdin -r -z --raw output: each commit ID NUL-terminated, then its raw records, each a : header and a path, both NUL-terminated. Why: One process lists every landed commit’s changed paths, so the parser keeps commits in output order.

In TS you’d write (pseudocode):

parseCommitChanges('abc\0:100644 100644 1 2 M\0a.txt\0'); // [{ commit: 'abc', paths: Set(['a.txt']) }]