[][src]Struct git_checks::CheckGitContext

pub struct CheckGitContext { /* fields omitted */ }

Git context for use in checks.

Methods

impl CheckGitContext[src]

pub fn new(workarea: GitWorkArea, topic_owner: Identity) -> Self[src]

Create a new git context for checking a commit.

pub fn git(&self) -> Command[src]

Create a git command for use in checks.

pub fn topic_owner(&self) -> &Identity[src]

The publisher of the branch.

pub fn check_attr<A, P>(&self, attr: A, path: P) -> Result<AttributeState> where
    A: AsRef<str>,
    P: AsRef<OsStr>, 
[src]

Check an attribute of the given path.

pub fn checkout<P>(&self, paths: &[P]) -> Result<()> where
    P: AsRef<OsStr>, 
[src]

Deprecated since 3.3.0:

UNSAFE: use Content::workarea to check out files

Checkout paths from the index to the filesystem.

Normally, files are not placed into the worktree, so checks which use other tools to inspect file contents do not work. This method checks out files to the working directory and fixes up Git's knowledge that they are there.

All paths supported by Git's globbing and searching mechanisms are supported.

pub fn cd_to_work_tree<'a>(&self, cmd: &'a mut Command) -> &'a mut Command[src]

Deprecated since 3.3.0:

not useful without the checkout method

Run a command from the work tree root.

pub fn workarea(&self) -> &GitWorkArea[src]

The workarea used for check operations.

pub fn workarea_mut(&mut self) -> &mut GitWorkArea[src]

The workarea used for check operations.

pub fn gitdir(&self) -> &Path[src]

The path to the git repository.

pub fn submodule_config(&self) -> &SubmoduleConfig[src]

The submodule configuration for the repository.

Trait Implementations

impl Debug for CheckGitContext[src]

Auto Trait Implementations

Blanket Implementations

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<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]