Struct git2::Reflog [−][src]
pub struct Reflog { /* fields omitted */ }A reference log of a git repository.
Methods
impl Reflog[src]
impl Reflogpub fn append(
&mut self,
new_oid: Oid,
committer: &Signature,
msg: Option<&str>
) -> Result<(), Error>[src]
pub fn append(
&mut self,
new_oid: Oid,
committer: &Signature,
msg: Option<&str>
) -> Result<(), Error>Add a new entry to the in-memory reflog.
pub fn remove(
&mut self,
i: usize,
rewrite_previous_entry: bool
) -> Result<(), Error>[src]
pub fn remove(
&mut self,
i: usize,
rewrite_previous_entry: bool
) -> Result<(), Error>Remove an entry from the reflog by its index
To ensure there's no gap in the log history, set rewrite_previous_entry
param value to true. When deleting entry n, member old_oid of entry
n-1 (if any) will be updated with the value of member new_oid of entry
n+1.
pub fn get(&self, i: usize) -> Option<ReflogEntry>[src]
pub fn get(&self, i: usize) -> Option<ReflogEntry>Lookup an entry by its index
Requesting the reflog entry with an index of 0 (zero) will return the most recently created entry.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeGet the number of log entries in a reflog
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturn true is there is no log entry in a reflog
ⓘImportant traits for ReflogIter<'reflog>pub fn iter(&self) -> ReflogIter[src]
ⓘImportant traits for ReflogIter<'reflog>
pub fn iter(&self) -> ReflogIterGet an iterator to all entries inside of this reflog
pub fn write(&mut self) -> Result<(), Error>[src]
pub fn write(&mut self) -> Result<(), Error>Write an existing in-memory reflog object back to disk using an atomic file lock.