Struct branchless::testing::GitWrapper[][src]

pub struct GitWrapper { /* fields omitted */ }
Expand description

Wrapper around a Git instance which cleans up the repository once dropped.

Methods from Deref<Target = Git>

Replace dynamic strings in the output, for testing purposes.

Get the PATH environment variable to use for testing.

Run a Git command.

Run a Git command.

Set up a Git repo in the directory and initialize git-branchless to work with it.

Set up a Git repo in the directory and initialize git-branchless to work with it.

Write the provided contents to the provided file in the repository root.

Commit a file with default contents. The time argument is used to set the commit timestamp, which is factored into the commit hash.

Commit a file with default contents. The time argument is used to set the commit timestamp, which is factored into the commit hash.

Detach HEAD. This is useful to call to make sure that no branch is checked out, and therefore that future commit operations don’t move any branches.

Get a git2::Repository object for this repository.

Get the version of the Git executable.

Determine if the Git executable supports the reference-transaction hook.

Resolve a file during a merge or rebase conflict with the provided contents.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.