Function parse_diff_from_buf

Source
pub fn parse_diff_from_buf(
    buff: &[u8],
    file_filter: &FileFilter,
) -> Vec<FileObj>
Expand description

Same as parse_diff but takes a buffer of bytes instead of a git2::Diff.

In the case that libgit2 fails to parse the buffer of bytes, a private algorithm is used. In such a case, brute force parsing the diff as a string can be costly. So, a log warning and error are output when this occurs. Please report this instance for troubleshooting/diagnosis as this likely means the diff is malformed or there is a bug in libgit2 source.