Skip to main content

Module git

Module git 

Source

Modules§

canonical
env
Git environment variables.
fmt
This crate depends on and re-exports from git_ref_format_core.
process
Functions that call to the git CLI instead of git2.
raw
This module re-exports selected items from the git2 crate and provides an extension trait for its git2::Error type to more conveniently handle errors associated with the code git2::ErrorCode::NotFound.
refs
url
Git URLs.

Structs§

Url
A git local transport URL.
UserInfo
The user information used for signing commits and configuring the name and email fields in the Git config.
Verbosity
Verbosity level for Git commands.
Version
A parsed git version.

Enums§

ListRefsError
Oid
ParseOidError
RefError
VersionError

Constants§

PROTOCOL_PORT
Default port of the git transport protocol.
VERSION_REQUIRED
Minimum required git version.

Functions§

commit
Create a commit and update the given ref to it.
configure_remote
Configure a repository’s radicle remote.
configure_repository
Configure a radicle repository.
empty_commit
Create an empty commit on top of the parent.
fetch
Fetch from the given remote.
head
Get the repository head.
head_refname
init_default_branch
initial_commit
Create an initial empty commit.
parse_ref
Parse a fmt::Qualified reference string. It will optionally return the namespace, if present.
parse_ref_namespaced
Parse a fmt::Qualified reference string while expecting the reference to start with refs/namespaces. If the namespace is not present, then an error will be returned.
push
Push refspecs to the given remote using the provided namespace.
remote_refs
List remote refs of a project, given the remote URL.
run
Execute a git command by spawning a child process and collect its output. If working is Some, the command is run as if git was started in working instead of the current working directory, by prepending -C <working> to the command line.
set_upstream
Set the upstream of the given branch to the given remote.
version
Get the system’s git version.
write_tree
Write a tree with the given blob at the given path.

Type Aliases§

BranchName