Module branchless::util[][src]

Expand description

Utility functions.

Structs

Path to the git executable on disk to be executed.

The parsed version of Git.

Enums

The result of attempting to resolve commits.

Functions

Get a mapping from OID to the names of branches which point to that OID.

Get the connection to the SQLite database for this repository.

Returns a path for a given file, searching through PATH to find it.

Get the OID for the repository’s HEAD reference.

Get the OID corresponding to the main branch.

Get the git repository associated with the current directory.

Get the reference corresponding to HEAD. Don’t use git2::Repository::head because that resolves the reference before returning it.

Returns the path to a shell suitable for running hooks.

Parse strings which refer to commits, such as:

Run Git in a subprocess, and inform the user.

Run Git silently (don’t display output to the user).

Run a provided Git hook if it exists for the repository.

Convert a git2::Error into an anyhow::Error with an auto-generated message.