Skip to main content

Module git

Module git 

Source
Expand description

Git infrastructure module router.

This parent module intentionally exposes child modules and re-exports the public git API surface.

Structs§

RealGitClient
Production GitClient implementation backed by real git commands.

Enums§

PullRebaseResult
Re-exported commit/sync/diff APIs. Result of attempting git pull --rebase.
RebaseStepResult
Re-exported rebase/conflict APIs. Result of attempting a rebase step.
SquashMergeOutcome
Re-exported squash-merge APIs. Outcome of attempting a squash merge operation.

Traits§

GitClient
Low-level async git boundary used by app orchestration code.

Functions§

abort_rebase
Re-exported rebase/conflict APIs. Aborts an in-progress rebase.
commit_all
Re-exported commit/sync/diff APIs. Stages all changes and commits them with the given message.
commit_all_preserving_single_commit
Re-exported commit/sync/diff APIs. Stages all changes and keeps a single commit for the provided message.
create_worktree
Re-exported worktree and branch-detection APIs. Creates a git worktree at the specified path with a new branch.
current_upstream_reference
Re-exported commit/sync/diff APIs. Returns the current upstream reference for HEAD.
delete_branch
Re-exported commit/sync/diff APIs. Deletes a git branch.
detect_git_info
Re-exported worktree and branch-detection APIs. Detects git repository information for the given directory. Returns the current branch name if in a git repository, None otherwise.
diff
Re-exported commit/sync/diff APIs. Returns the output of git diff for the given repository path, showing all changes (committed and uncommitted) relative to the base branch.
fetch_remote
Re-exported commit/sync/diff APIs. Fetches from the configured remote.
find_git_repo_root
Re-exported worktree and branch-detection APIs. Walks up the directory tree to find a .git directory. Returns the directory containing .git (the repository root) if found, None otherwise.
get_ahead_behind
Re-exported commit/sync/diff APIs. Returns the number of commits ahead and behind the upstream branch.
has_unmerged_paths
Re-exported rebase/conflict APIs. Returns whether unresolved paths still exist in the index.
head_short_hash
Re-exported commit/sync/diff APIs. Returns the short hash of the current HEAD commit.
is_rebase_in_progress
Re-exported rebase/conflict APIs. Returns whether a rebase is currently in progress in the repository or worktree.
is_worktree_clean
Re-exported commit/sync/diff APIs. Returns whether a repository or worktree has no uncommitted changes.
list_conflicted_files
Re-exported rebase/conflict APIs. Returns conflicted file paths for the current index.
list_local_commit_titles
Re-exported commit/sync/diff APIs. Returns local commit subjects that are not yet present in upstream.
list_staged_conflict_marker_files
Re-exported rebase/conflict APIs. Returns which of the given paths still contain git conflict markers (<<<<<<<) in their staged content.
list_upstream_commit_titles
Re-exported commit/sync/diff APIs. Returns upstream commit subjects that are not yet in local HEAD.
main_repo_root
Re-exported repository metadata APIs. Resolves the main repository root for a repository or linked worktree.
pull_rebase
Re-exported commit/sync/diff APIs. Runs git pull --rebase and returns conflict outcome when applicable.
push_current_branch
Re-exported commit/sync/diff APIs. Pushes the current branch to its upstream remote.
push_current_branch_to_remote_branch
Re-exported commit/sync/diff APIs. Pushes the current branch to one explicit remote branch name and returns the resulting upstream reference.
rebase
Re-exported rebase/conflict APIs. Rebases the current branch onto target_branch.
rebase_continue
Re-exported rebase/conflict APIs. Continues an in-progress rebase.
rebase_start
Re-exported rebase/conflict APIs. Rebases the current branch onto target_branch.
remove_worktree
Re-exported worktree and branch-detection APIs. Removes a git worktree at the specified path.
repo_url
Re-exported repository metadata APIs. Returns the origin repository URL normalized to HTTPS form when possible.
squash_merge
Re-exported squash-merge APIs. Performs a squash merge from a source branch to a target branch.
squash_merge_diff
Re-exported squash-merge APIs. Returns the full patch diff that will be squashed when merging a source branch into a target branch.
stage_all
Re-exported commit/sync/diff APIs. Stages all changes in the repository or worktree.

Type Aliases§

GitFuture
Boxed async result used by GitClient trait methods.