Trait git_checks::Content [] [src]

pub trait Content {
    fn sha1(&self) -> Option<&CommitId>;
    fn diffs(&self) -> &Vec<DiffInfo>;
    fn path_diff(&self, path: &FileName) -> Result<String>;

    fn modified_files(&self) -> Vec<&FileName> { ... }
}

A trait for representing the content of a diff.

This may be used for checks which do not require any metadata.

Required Methods

The SHA1 of the commit (if the content is of a commit).

The differences in the content.

Get the patch difference for the given path.

Provided Methods

Return a vector of files modified in a diff.

This excludes paths which are either not actually files (e.g., submodules and symlinks), as well as paths which were deleted in this commit.

Implementors