Expand description
Git commit and push facade.
Purpose:
- Expose commit, restore, upstream, and rebase-aware push operations from a thin git module.
Responsibilities:
- Re-export working-tree mutation helpers.
- Re-export upstream/query helpers and rebase-aware push behavior.
- Keep tests and sub-concerns in focused companions.
Scope:
- Git commit/push workflows only.
- Error types, status helpers, and branch lookup remain in sibling git modules.
Usage:
- Imported through
crate::gitby command workflows and tests.
Invariants/assumptions:
- Public APIs preserve existing behavior and error types.
- Rebase-aware push remains the single entrypoint for retrying non-fast-forward pushes.
Functionsยง
- abort_
rebase - Abort an in-progress rebase.
- add_
paths_ force - Force-add existing paths, even if they are ignored.
- commit_
all - Create a commit with all changes.
- fetch_
branch - Fetch a specific branch from origin.
- is_
ahead_ of_ upstream - Check if HEAD is ahead of the configured upstream.
- is_
behind_ upstream - Check if the current branch is behind its upstream.
- list_
conflict_ files - List files with merge conflicts.
- push_
current_ branch - Push the current branch to a remote.
- push_
head_ to_ branch - Push HEAD to a specific branch on a remote.
- push_
upstream - Push HEAD to the configured upstream.
- push_
upstream_ allow_ create - Push HEAD to origin and create upstream tracking.
- push_
upstream_ with_ rebase - Push HEAD to upstream, rebasing on non-fast-forward rejections.
- rebase_
onto - Rebase current branch onto a target reference.
- restore_
tracked_ paths_ to_ head - Restore tracked paths to the current HEAD (index + working tree).
- revert_
uncommitted - Revert uncommitted changes, restoring the working tree to current HEAD.
- upstream_
ref - Get the configured upstream for the current branch.