Expand description
Utilities for handling git repositories, mainly around authentication/cloning.
Structs
- A local checkout of a particular revision from a
GitDatabase. - A local clone of a remote repository’s database. Multiple
GitCheckouts can be cloned from a singleGitDatabase. - A remote repository. It gets cloned into a local
GitDatabase. - A short abbreviated OID.
Enums
- The result of GitHub fast path check. See
github_fast_pathfor more.
Constants
- A file indicates that if present,
git resethas been done and a repo checkout is ready to go. SeeGitCheckout::resetfor why we need this.
Functions
- Constructs an absolute URL for a child submodule URL with its parent base URL.
- Removes temporary files left from previous activity.
- Attempts to fetch the given git
referencefor a Git repository. - Attempts to use
gitCLI installed on the system to fetch a repository, when the config valuenet.git-fetch-with-cliis set. - Attempts GitHub’s special fast path for testing if we’ve already got an up-to-date copy of the repository.
gitoxideuses shallow locks to assure consistency when fetching to and to avoid races, and to write files atomically. Cargo has its own lock files and doesn’t need that mechanism for race protection, so a stray lock means a signal interrupted a previous shallow fetch and doesn’t mean a race is happening.- init 🔒Initializes a Git repository at
path. - Whether a
urlis one from GitHub. - Whether
revis a shorter hash ofoid. - Whether a
revlooks like a commit hash (ASCII hex digits). - Attempts to
git gca repository. - Reinitializes a given Git repository. This is useful when a Git repository seems corrupted and we want to start over.
- reset 🔒
git reset --hardto the givenobjfor therepo. - Prepare the authentication callbacks for cloning a git repository.
- Prepares the callbacks for fetching a git repository.