Struct git2::BlameHunk
[−]
[src]
pub struct BlameHunk<'blame> { // some fields omitted }
Structure that represents a blame hunk.
Methods
impl<'blame> BlameHunk<'blame>
fn final_commit_id(&self) -> Oid
Returns OID of the commit where this line was last changed
fn final_signature(&self) -> Signature
Returns signature of the commit.
fn final_start_line(&self) -> usize
Returns line number where this hunk begins.
Note that the start line is counting from 1.
fn orig_commit_id(&self) -> Oid
Returns the OID of the commit where this hunk was found.
This will usually be the same as final_commit_id
,
except when BlameOptions::track_copies_any_commit_copies
has been
turned on
fn orig_signature(&self) -> Signature
Returns signature of the commit.
fn orig_start_line(&self) -> usize
Returns line number where this hunk begins.
Note that the start line is counting from 1.
fn path(&self) -> Option<&Path>
Returns path to the file where this hunk originated.
Note: None
could be returned for non-unicode paths on Widnows.
fn is_boundary(&self) -> bool
Tests whether this hunk has been tracked to a boundary commit (the root, or the commit specified in git_blame_options.oldest_commit).
fn lines_in_hunk(&self) -> usize
Returns number of lines in this hunk.