[][src]Struct git2::Revwalk

pub struct Revwalk<'repo> { /* fields omitted */ }

A revwalk allows traversal of the commit graph defined by including one or more leaves and excluding one or more roots.

Methods

impl<'repo> Revwalk<'repo>[src]

pub fn reset(&mut self)[src]

Reset a revwalk to allow re-configuring it.

The revwalk is automatically reset when iteration of its commits completes.

pub fn set_sorting(&mut self, sort_mode: Sort)[src]

Set the order in which commits are visited.

pub fn simplify_first_parent(&mut self)[src]

Simplify the history by first-parent

No parents other than the first for each commit will be enqueued.

pub fn push(&mut self, oid: Oid) -> Result<(), Error>[src]

Mark a commit to start traversal from.

The given OID must belong to a committish on the walked repository.

The given commit will be used as one of the roots when starting the revision walk. At least one commit must be pushed onto the walker before a walk can be started.

pub fn push_head(&mut self) -> Result<(), Error>[src]

Push the repository's HEAD

For more information, see push.

pub fn push_glob(&mut self, glob: &str) -> Result<(), Error>[src]

Push matching references

The OIDs pointed to by the references that match the given glob pattern will be pushed to the revision walker.

A leading 'refs/' is implied if not present as well as a trailing / \ * if the glob lacks '?', ' \ *' or '['.

Any references matching this glob which do not point to a committish will be ignored.

pub fn push_range(&mut self, range: &str) -> Result<(), Error>[src]

Push and hide the respective endpoints of the given range.

The range should be of the form <commit>..<commit> where each <commit> is in the form accepted by revparse_single. The left-hand commit will be hidden and the right-hand commit pushed.

pub fn push_ref(&mut self, reference: &str) -> Result<(), Error>[src]

Push the OID pointed to by a reference

The reference must point to a committish.

pub fn hide(&mut self, oid: Oid) -> Result<(), Error>[src]

Mark a commit as not of interest to this revwalk.

pub fn hide_head(&mut self) -> Result<(), Error>[src]

Hide the repository's HEAD

For more information, see hide.

pub fn hide_glob(&mut self, glob: &str) -> Result<(), Error>[src]

Hide matching references.

The OIDs pointed to by the references that match the given glob pattern and their ancestors will be hidden from the output on the revision walk.

A leading 'refs/' is implied if not present as well as a trailing / \ * if the glob lacks '?', ' \ *' or '['.

Any references matching this glob which do not point to a committish will be ignored.

pub fn hide_ref(&mut self, reference: &str) -> Result<(), Error>[src]

Hide the OID pointed to by a reference.

The reference must point to a committish.

Trait Implementations

impl<'repo> Drop for Revwalk<'repo>[src]

impl<'repo> Iterator for Revwalk<'repo>[src]

type Item = Result<Oid, Error>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'repo> Unpin for Revwalk<'repo>

impl<'repo> !Sync for Revwalk<'repo>

impl<'repo> !Send for Revwalk<'repo>

impl<'repo> UnwindSafe for Revwalk<'repo>

impl<'repo> RefUnwindSafe for Revwalk<'repo>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]