Struct git_checks::Commit
[−]
[src]
pub struct Commit { pub sha1: CommitId, pub sha1_short: String, pub message: String, pub parents: Vec<CommitId>, pub diffs: Vec<DiffInfo>, pub author: Identity, pub committer: Identity, // some fields omitted }
Representation of a commit with information useful for commit checks.
Fields
sha1: CommitId
The SHA1 of the commit.
sha1_short: String
An unambiguous short hash for the commit.
message: String
The commit message.
parents: Vec<CommitId>
The parents of the commit.
diffs: Vec<DiffInfo>
Information about files that changed in this commit.
The identity of the author.
committer: Identity
The identity of the commiter.
Methods
impl Commit
[src]
fn new(ctx: &GitContext, sha1: &CommitId) -> Result<Self>
Create a new commit from the given context for the SHA1.
fn file_patch<P>(&self, path: P) -> Result<String> where P: AsRef<OsStr>
Get the patch difference for the given path.