[][src]Struct gitrevset::Repo

pub struct Repo { /* fields omitted */ }

Repo with extra states to support revset queries.

Implementations

impl Repo[src]

pub fn open_from_env() -> Result<Self>[src]

Open an existing repo. Build indexes on demand.

pub fn open_from_repo(
    git_repo: impl AsRef<Repository> + 'static
) -> Result<Self>
[src]

Open an existing repo previously opened by libgit2. Build commit graph indexes on demand.

pub fn revs(&self, ast: impl ParseToExpr) -> Result<Set>[src]

Evaluate the expression. Return the resulting set. User-defined aliases are ignored.

pub fn anyrevs(&self, ast: impl ParseToExpr) -> Result<Set>[src]

Evaluate the expression. Return the resulting set. User-defined aliases are respected.

To define aliases, add a [revsetalias] section like:

[revsetalias]
# f(x) can be used, and will be expended to ancestor(x) + x.
f = ancestor($1) + $1

pub fn revs_with_context(
    &self,
    ast: impl ParseToExpr,
    ctx: &EvalContext
) -> Result<Set>
[src]

Evaluate the expression with the given context. Return the resulting set.

pub fn dag(&self) -> &GitDag[src]

Obtains read-only dag reference.

pub fn git_repo(&self) -> &Repository[src]

Obtains read-only git2::Repository reference.

pub fn eval_context_from_config(&self) -> Result<&EvalContext>[src]

Returns a EvalContext that contains user-defined alias in the [revsetalias] config section.

Auto Trait Implementations

impl !RefUnwindSafe for Repo

impl !Send for Repo

impl !Sync for Repo

impl Unpin for Repo

impl !UnwindSafe for Repo

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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<V, T> VZip<V> for T where
    V: MultiLane<T>,