Module testutil

Source
Expand description

Utilities for writing tests that interact with Git.

Structs§

CommitBuilder
Builder for creating a new commit.
CommitDiffBuilder
Builder for creating a new commit diff.
CreateCommitOptions
Options for creating a new commit.
FileStatusBuilder
Builder for creating a new reference.
ReferenceBuilder
Builder for creating a new reference.

Functions§

add_path_to_index
Add a path to the working index.
commit_id_from_ref
Get the Commit Oid from a reference name.
create_commit
Create a commit based on the provided options. If options is not provided, will create a commit using the default options. This function does not add modified or new files to the stage before creating a commit.
head_id
Get the Oid of provided head reference name.
remove_path_from_index
Remove a path to the working index.
repo_path
Get the the path to the repository.
with_temp_bare_repository
Provide a bare repository for testing in a temporary directory.
with_temp_repository
Provides a new repository instance in a temporary directory for testing that contains an initial empty commit.