Skip to main content

Module git

Module git 

Source
Expand description

Git operations wrapper

Provides a unified interface for git operations. Uses git2 (libgit2 bindings) by default. Can optionally use gitoxide (gix) with the “gitoxide” feature flag.

Re-exports§

pub use cache::invalidate_status_cache;
pub use cache::GitStatusCache;
pub use cache::STATUS_CACHE;
pub use branch::*;
pub use remote::*;
pub use status::*;

Modules§

backend
Git backend abstraction
branch
Git branch operations
cache
Git status cache
cherry_pick
Git cherry-pick operations
gc
Git garbage collection operations
git2_backend
Git2 (libgit2) implementation of GitBackend / GitRepo.
remote
Git remote operations
status
Git status operations

Enums§

GitError
Errors that can occur during git operations

Functions§

clone_repo
Clone a repository
get_current_branch
Get the current branch name
get_workdir
Get the working directory of a repository Works correctly for both regular repos and worktrees
git_lock_exists
Check if a git lock file exists (.git/index.lock).
is_git_repo
Check if a path is a git repository
open_repo
Open a git repository at the given path
path_exists
Check if a path exists
wait_for_git_lock
Wait for a git lock to be released with exponential backoff.