Module cpp_linter::git
source · Expand description
This module is primarily used to parse diff blobs.
It can also be used (locally) to get a list of files changes from either the last commit or the next commit’s staging area.
This also includes a private module that is used as a fallback (brute force) mechanism when parsing diffs fail using libgit2. NOTE: parsing a diff from a buffer (str or bytes) only happens in CI or when libgit2 cannot be used to initialize a repository.
Functions§
- Fetch the
git2::Diff
about a givengit2::Repository
. - This (re-)initializes the repository located in the specified
path
. - Parses a given
git2::Diff
and returns a list ofFileObj
s. - Same as
parse_diff
but takes a buffer of bytes instead of agit2::Diff
.