Expand description
Git operations using system git command.
All functions shell out to git via std::process::Command.
This eliminates the heavy gix dependency and works with any
git transport (including dumb HTTP).
Structs§
- GitSize
Limits - Disk budget for cloned/fetched git repositories.
- GitSize
Stats
Enums§
- GitError
- Error type for git operations.
Constants§
- CMN_
PROMISOR_ REMOTE - GIT_
COMMAND_ TIMEOUT - Default wall-clock limit for every system git invocation.
Functions§
- add_
all_ and_ commit - Add all files and create a commit. Returns the commit SHA.
- add_
remote - Add a remote to the repository.
- checkout_
ref - Checkout a specific ref (commit SHA, tag, or branch).
- clone_
bare_ repo - Clone a git repository as a bare repository.
- clone_
from_ local - Clone from a local bare repository to a working directory.
- clone_
from_ local_ no_ checkout - Clone from a local bare repository without checking out files.
- clone_
repo - Clone a git repository to the specified destination.
- commit_
exists - Check if a commit exists in the repository.
- configure_
blobless_ origin - Configure origin as a blobless promisor remote for lazy blob fetching.
- configure_
blobless_ promisor_ remote - Configure a blobless promisor remote for lazy blob fetching.
- enforce_
size_ budget - Walk a git checkout/cache path without following symlinks and enforce disk limits.
- fetch_
from_ remote - Fetch from a named remote in the repository.
- fetch_
to_ bare - Fetch from a remote URL into a bare repository.
- get_
head_ commit - Get the current HEAD commit ID as a string.
- get_
remote_ url - Get the URL of a named remote, or None if the remote doesn’t exist.
- get_
root_ commit - Get the root commit SHA (first commit in history) from a working directory.
- get_
root_ commit_ bare - Get the root commit from a bare repository.
- init_
repo - Initialize a new git repository at the given path.
- is_
available - Check if system git is available.
- is_
working_ dir_ clean - Check if the working directory has uncommitted changes.
- last_
commit_ epoch_ ms - Get the latest git commit timestamp for a path, if the path is in a repo.
- set_
remote_ url - Set the URL for an existing remote.