Struct git_checks::CheckGitContext
[−]
[src]
pub struct CheckGitContext { /* fields omitted */ }
Git context for use in checks.
Methods
impl CheckGitContext
[src]
fn new(workarea: GitWorkArea, topic_owner: Identity) -> Self
Create a new git context for checking a commit.
fn git(&self) -> Command
Create a git command for use in checks.
fn topic_owner(&self) -> &Identity
The publisher of the branch.
fn check_attr<A, P>(&self, attr: A, path: P) -> Result<AttributeState> where
A: AsRef<str>,
P: AsRef<OsStr>,
A: AsRef<str>,
P: AsRef<OsStr>,
Check an attribute of the given path.
fn checkout<P>(&self, paths: &[P]) -> Result<()> where
P: AsRef<OsStr>,
P: AsRef<OsStr>,
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.
fn cd_to_work_tree<'a>(&self, cmd: &'a mut Command) -> &'a mut Command
Run a command from the work tree root.
fn gitdir(&self) -> &Path
The path to the git repository.
fn submodule_config(&self) -> &SubmoduleConfig
The submodule configuration for the repository.