Module branchless::git

source ·
Expand description

Tools for interfacing with the Git repository.

Structs

Represents a Git branch.
Options for Repo::cherry_pick_fast.
Represents a commit object in the Git object database.
Wrapper around the config values stored on disk for Git.
A wrapper around a possible value that can be set for a config key.
A diff between two trees/commits.
Path to the git executable on disk to be executed.
Options for invoking Git.
The result of invoking Git.
The parsed version of Git.
The Git index.
An entry in the Git index.
Represents the ID of a Git object.
A checksum of the diff induced by a given commit, used for duplicate commit detection.
Represents a reference to an object.
The name of a reference, like refs/heads/master.
Wrapper around git2::Repository.
A snapshot of information about a certain reference. Updates to the reference after this value is obtained are not reflected.
The status of a file in the repo.
A timestamp as used in a [Signature].
A tree object. Contains a mapping from name to OID.
A special Commit which represents the status of the working copy at a given point in time. This means that it can include changes in any stage.

Enums

Options for Repo::amend_fast
Determine what kind of branch a reference is, given its name. The returned suffix value is converted to a String to be rendered to the screen, so it may have lost some information if the reference name had unusual characters.
An error raised when attempting the Repo::cherry_pick_fast operation.
Wrapper around git2::FileMode.
Represents an OID which may be zero or non-zero. This exists because Git often represents the absence of an object using the zero OID. We want to statically check for those cases by using a more descriptive type.
The target of a reference.
The possible stages for items in the index.
The command to update the index, as defined by git update-index.
The type of changes in the working copy, if any.

Traits

Read-only interface to Git’s configuration.
Write-only interface to Git’s configuration.

Functions

Filter the entries in the provided tree by only keeping the provided paths.
Add the provided entries into the tree.
Clean up a message, removing extraneous whitespace plus comment lines starting with comment_char, and ensure that the message ends with a newline.
Calculate the diff between the index and the working copy.
Update the index. This handles updates to stages other than 0.

Type Definitions

Re-export of git2::BranchType. This might change to be an opaque type later.
Result type.