[−][src]Struct gitrevset::Repo
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]
git_repo: impl AsRef<Repository> + 'static
) -> Result<Self>
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]
&self,
ast: impl ParseToExpr,
ctx: &EvalContext
) -> Result<Set>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,