Structs§
- Apply
GitRequest - Parameters for invoking
apply_git_patch. - Apply
GitResult - Result of running
apply_git_patch, including paths gleaned from stdout/stderr. - Commit
LogEntry - A minimal commit summary entry used for pickers (subject + timestamp + sha).
- GitBaseline
Change - One changed file between a git baseline and the current directory.
- GitBaseline
Diff - Structured diff from the latest git baseline reset to the current directory.
- GitDiff
ToRemote - GitInfo
- GitSha
Enums§
- Fsmonitor
Override - The safe
core.fsmonitoroverride for an internal Git command. - GitBaseline
Change Status - File-level change status between a git baseline and the current directory.
- GitTooling
Error - Errors returned while managing git worktree snapshots.
Traits§
- Fsmonitor
Probe Runner - Executes the Git commands required by
detect_fsmonitor_override.
Functions§
- apply_
git_ patch - Apply a unified diff to the target repository by shelling out to
git apply. - canonicalize_
git_ remote_ url - collect_
git_ info - Collect git repository information from the given working directory using command-line git. Returns None if no git repository is found or if git operations fail. Uses timeouts to prevent freezing on large repositories. All git commands (except the initial repo check) run in parallel for better performance.
- create_
symlink - current_
branch_ name - Returns the current checked out branch name.
- default_
branch_ name - Determine the repository’s default branch name, if available.
- detect_
fsmonitor_ override - Returns the safe filesystem monitor override for the target repository.
- diff_
since_ latest_ init - Returns the diff between the latest baseline reset and the current directory contents.
- ensure_
git_ baseline_ repository - Ensures
roothas a usable git baseline repository. - extract_
paths_ from_ patch - Collect every path referenced by the diff headers inside
diff --gitsections. - get_
git_ remote_ urls - Collect fetch remotes in a multi-root-friendly format: {“origin”: “https://…”}.
- get_
git_ remote_ urls_ assume_ git_ repo - Collect fetch remotes without checking whether
cwdis in a git repo. - get_
git_ repo_ root - Return
trueif the project folder specified by theConfigis inside a Git repository. - get_
git_ repo_ root_ with_ fs - Return the repository root for
cwdusing the provided filesystem. - get_
has_ changes - get_
head_ commit_ hash - Return the current HEAD commit hash without checking whether
cwdis in a git repo. - git_
diff_ to_ remote - Returns the closest git sha to HEAD that is on a remote as well as the diff to that sha.
- local_
git_ branches - Returns a list of local git branches. Includes the default branch at the beginning of the list, if it exists.
- merge_
base_ with_ head - Returns the merge-base commit between
HEADand the latest version between local and remote of the provided branch, if both exist. - parse_
git_ apply_ output - Parse
git applyoutput into applied/skipped/conflicted path groupings. - recent_
commits - Return the last
limitcommits reachable from HEAD for the current branch. Each entry contains the SHA, commit timestamp (seconds), and subject line. Returns an empty vector if not in a git repo or on error/timeout. - reset_
git_ repository - Replaces any existing
.gitmetadata inrootwith a fresh one-commit baseline. - resolve_
root_ git_ project_ for_ trust - Resolve the path that should be used for trust checks. Similar to
[get_git_repo_root], but resolves to the root of the main repository. Handles worktrees via filesystem inspection without invoking thegitexecutable. - stage_
paths - Stage only the files that actually exist on disk for the given diff.