Module git

Source

Modules§

canonical
env
Git environment variables.
ext
Extensions and wrappers for git2 types
fmt
Everything you never knew you wanted for handling git ref names.
process
Functions that call to the git CLI instead of git2.
raw
libgit2 bindings for Rust
refs
url
Git URLs.

Macros§

qualified
Create a [git_ref_format_core::Qualified] from a string literal.
refname
Create a [git_ref_format_core::RefString] from a string literal.

Structs§

Component
A path component of a RefStr.
Namespaced
A Qualified ref under a git namespace.
Oid
Serializable git2::Oid
PatternStr
PatternString
Qualified
A fully-qualified refname.
RefStr
RefString
Refspec
A Git refspec.
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.
Version
A parsed git version.

Enums§

Error
ListRefsError
NotFound
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.
is_not_found_err
parse_ref
Parse a format::Qualified reference string. It will optionally return the namespace, if present.
parse_ref_namespaced
Parse a format::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.
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