Skip to main content

Crate ytil_git

Crate ytil_git 

Source
Expand description

Lightweight Git helpers atop git2 with fallbacks to git CLI.

Modules§

branch
Branch operations for Git repositories.
diff
remote
repo

Structs§

GitStatusEntry
Combined staged + worktree status for a path.
Repository
An owned git repository, representing all state associated with the underlying filesystem.

Enums§

CmdError
Command execution errors with contextual details.
IndexState
Staged (index) status for a path.
WorktreeState
Unstaged (worktree) status for a path.

Functions§

add_to_index
Stage pathspecs into the index (like git add).
get_current_commit_hash
Retrieves the commit hash of the current HEAD.
get_status
Enumerate combined staged + unstaged status entries.
restore
Restore one or more paths from index or optional branch.
unstage
Unstage specific paths without touching working tree contents.