Module git

Module git 

Source
Expand description

Git operations wrapper for AGPM.

This module provides an async wrapper around the system git command. Uses system Git (not libgit2) for maximum compatibility with authentication, configurations, and platforms.

§Core Features

  • Async operations: Non-blocking I/O using Tokio
  • Worktree support: Parallel package installation via Git worktrees
  • Authentication: HTTPS tokens, SSH keys, credential helpers
  • Cross-platform: Windows, macOS, Linux support
  • Progress reporting: User feedback during long operations
  • Tag caching: Per-instance caching for performance (v0.4.11+)

§Security

  • Command injection prevention via proper argument passing
  • Credentials never logged or exposed in errors
  • HTTPS verification enabled by default

Modules§

command_builder
Type-safe Git command builder for consistent command execution

Structs§

GitRepo
A Git repository handle providing async operations via CLI commands.

Functions§

ensure_git_available
Ensures Git is available on the system or returns a detailed error.
ensure_valid_git_repo
Ensures a directory contains a valid Git repository or returns a detailed error.
is_git_installed
Checks if Git is installed and accessible on the system.
is_git_repository
Checks if a path contains a Git repository (regular or bare).
is_valid_git_repo
Checks if a directory contains a valid Git repository.
parse_git_url
Parses a Git URL into owner and repository name components.
strip_auth_from_url
Strips authentication information from a Git URL for safe display or logging.