Skip to main content

Module lfs

Module lfs 

Source
Expand description

Git LFS (Large File Storage) operations and validation.

This module provides functions for detecting, validating, and managing Git LFS in repositories. It includes health checks, filter validation, and pointer file validation.

§Invariants

  • Gracefully handles repositories without LFS (returns empty results, not errors)
  • LFS pointer files are validated against the spec format

§What this does NOT handle

  • Regular git operations (see git/status.rs, git/commit.rs)
  • Repository cleanliness checks (see git/clean.rs)

Structs§

LfsFilterStatus
LFS filter configuration status.
LfsHealthReport
Comprehensive LFS health check result.
LfsStatusSummary
Summary of LFS status from git lfs status.

Enums§

LfsPointerIssue
Issue detected with an LFS pointer file.

Functions§

check_lfs_health
Performs a comprehensive LFS health check.
check_lfs_status
Runs git lfs status and parses the output to detect LFS issues.
filter_modified_lfs_files
Filter status paths to only include LFS-tracked files.
has_lfs
Detects if Git LFS is initialized in the repository.
list_lfs_files
Returns a list of LFS-tracked files in the repository.
validate_lfs_filters
Validates that LFS smudge/clean filters are properly installed in git config.
validate_lfs_pointers
Validates LFS pointer files for correctness.