Skip to main content

Module error

Module error 

Source
Expand description

Git-related error types and error classification.

This module defines all error types that can occur during git operations. It provides structured error variants for common failure modes like dirty repositories, authentication failures, and missing upstream configuration.

§Invariants

  • All error types implement Send + Sync for anyhow compatibility
  • Error messages should be actionable and include context where possible

§What this does NOT handle

  • Success cases or happy-path results
  • Non-git related errors (use anyhow for those)

Enums§

GitError
Errors that can occur during git operations.

Functions§

classify_push_error
Classify a push error from stderr into a specific GitError variant.
git_base_command
Build a base git command with fsmonitor disabled.
git_run
Run a git command and return an error on failure.