Module git

Source
Expand description

Git-related functions and types.

Modules§

ddiff
DDiff is a diff between diffs. The type aids in the review of a Patch to a project by providing useful context between Patch updates a regular Diff will miss.
pretty_diff
unified_diff
Formatting support for Git’s diff format.

Structs§

AnnotatedCommit
A structure to represent an annotated commit, the input to merge and rebase.
CheckoutBuilder
A builder struct for configuring checkouts of a repository.
Commit
A structure to represent a git commit
MergeAnalysis
The results of merge_analysis indicating the merge opportunities.
MergeOptions
Options to specify when merging.
Oid
Unique identity of any object (commit, tree, blob, tag).
Reference
A structure to represent a git reference.
Remote
Repository
An owned git repository, representing all state associated with the underlying filesystem.
Rev
Git revision parameter. Supports extended SHA-1 syntax.
Signature
A Signature is used to indicate authorship of various actions throughout the library.

Enums§

Direction
An enumeration of the possible directions for a remote.
ErrorCode
An enumeration of possible errors that can happen when working with a git repository.
RemoteError

Constants§

CONFIG_COMMIT_GPG_SIGN
CONFIG_GPG_FORMAT
CONFIG_GPG_SSH_ALLOWED_SIGNERS
CONFIG_GPG_SSH_PROGRAM
CONFIG_SIGNING_KEY

Functions§

add_gitsigners
Add signers to the repository’s .gitsigners file.
add_tag
branch_remote
Get the name of the remote of the given branch, if any.
check_version
Check that the system’s git version is supported. Returns an error otherwise.
commit_ssh_fingerprint
From a commit hash, return the signer’s fingerprint, if any.
configure_signing
Configure SSH signing in the given git repo, for the given peer.
git
Execute a git command by spawning a child process.
ignore
Add a path to the repository’s git ignore file. Creates the ignore file if it does not exist.
is_remote
Check if the git remote is configured for the Repository.
is_signing_configured
Check whether SSH or GPG signing is configured in the given repository.
parse_remote
Parse a remote refspec into a peer id and ref.
rad_remote
Get the repository’s “rad” remote.
rad_remotes
Return the list of radicle remotes for the given repository.
read_gitsigners
Read a .gitsigners file. Returns SSH keys.
remove_remote
repository
Get the git repository in the current directory.
set_tracking
Setup an upstream tracking branch for the given remote and branch. Creates the tracking branch if it does not exist.
view_diff
write_gitsigners
Write a .gitsigners file in the given repository. Fails if the file already exists.