Skip to main content

Crate gitr

Crate gitr 

Source
Expand description

§gitr

Async typed git CLI wrapper for agents and automation.

§Quick start

use gitr::Repository;

let repo = Repository::open(".").await?;
let branch = repo.current_branch().await?;

Modules§

parse
Git CLI output parsers.

Structs§

ApplyReport
Result of applying a patch.
BatchProcess
A long-running git cat-file --batch process for bulk object reads.
BisectResult
Result of a completed git bisect run.
BisectState
State of an in-progress git bisect.
BlameLine
A single line from git blame --line-porcelain.
Cache
Simple in-memory TTL cache for expensive git operations.
CherryPickOptions
Options for Repository::cherry_pick.
CircuitBreaker
Simple circuit breaker for network operations.
CloneOptions
Options for Repository::clone.
CommandOutput
Output of a finished git command.
CommitOptions
Options for Repository::commit.
DiffHunk
A hunk inside a file diff.
DiffLine
A single line inside a diff hunk.
FetchOptions
Options for Repository::fetch.
FileDiff
A single file diff.
GitAttr
A single git attribute result.
GitCommit
A parsed commit object.
GitGrepResult
A single match from git grep.
GitLfsFile
A file tracked by Git LFS.
GitLogEntry
A single entry from git log.
GitMergeResult
Result of a read-only merge-tree operation.
GitNote
A git note entry.
GitRemote
A configured git remote.
GitStash
A single stash entry.
GitStatus
Status of a git working tree, parsed from porcelain output.
GitSubmodule
A git submodule entry from git submodule status.
GitTag
A git tag.
GitVerification
Result of verifying a GPG signature on a commit.
GitVersion
Parsed git version number.
GitWorktree
A git worktree.
Hook
A git hook in .git/hooks/.
HookOutput
Output from running a git hook.
IndexEntry
An index entry from git ls-files --stage.
MergeOptions
Options for Repository::merge.
ObjectContent
Raw content of a git object from git cat-file.
Oid
A validated git object identifier (SHA-1 or SHA-256 prefix).
Patch
A patch generated by git format-patch.
PushOptions
Options for Repository::push.
RebaseOptions
Options for Repository::rebase.
ReflogEntry
A single entry from git reflog.
Repository
A typed handle to a git repository.
TreeEntry
A tree entry for git mktree.

Enums§

DiffLineKind
A single line inside a diff hunk.
Error
Errors that can occur when interacting with git repositories.
ObjectKind
Kind of a git object.
ResetMode
Reset mode.

Traits§

GitApi
High-level async trait for git repository operations.