Struct git_workarea::GitContext
source · [−]pub struct GitContext { /* private fields */ }
Expand description
A context for performing git commands.
Implementations
Create a new context for the given directory.
Create a new context for the given directory with git configuration.
Run a git command in the context.
This builds a Command
with the proper environment to operate within the context.
Fetch references from the given remote.
The remote is interpreted by Git, so it can be a remote or a specific URL.
Fetch a commit from the given remote into a specific local refname.
Fetch a commit from the given remote into a specific local refname, allowing rewinds.
Determine the “default branch” for the repository.
Create a tree where further work on the given revision can occur.
Reserve a refname for the given commit.
Returns the name of the reserved ref pointing to the given commit and its ID.
The reserved reference is created as refs/{name}/heads/{id}
where id
is a unique
integer (which is also returned).
Reserve two refnames for the given commit.
Returns the names of the two reserved refs, the first pointing to the given commit and the second available for further work.
The reserved references are created as refs/{name}/heads/{id}
and
refs/{name}/bases/{id}
where the bases
reference is available to point to an object
associated with the heads
reference.
It is assumed that the bases
refs are aligned with the heads
references and not used
for other purposes.
Check if a topic commit is mergeable into a target branch.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GitContext
impl Send for GitContext
impl Sync for GitContext
impl Unpin for GitContext
impl UnwindSafe for GitContext
Blanket Implementations
Mutably borrows from an owned value. Read more