Expand description
Git-related functions and types.
Modules§
- ddiff
DDiff
is a diff between diffs. The type aids in the review of aPatch
to a project by providing useful context betweenPatch
updates a regularDiff
will miss.- pretty_
diff - unified_
diff - Formatting support for Git’s diff format.
Structs§
- Annotated
Commit - A structure to represent an annotated commit, the input to merge and rebase.
- Checkout
Builder - A builder struct for configuring checkouts of a repository.
- Commit
- A structure to represent a git commit
- Merge
Analysis - The results of
merge_analysis
indicating the merge opportunities. - Merge
Options - 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.
- Error
Code - An enumeration of possible errors that can happen when working with a git repository.
- Remote
Error
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.