module documentation
Git maintenance implementation.
This module provides the git maintenance functionality for optimizing and maintaining Git repositories.
| Class | |
Commit-graph maintenance task. |
| Class | |
Garbage collection maintenance task. |
| Class | |
Incremental-repack maintenance task. |
| Class | |
Loose-objects maintenance task. |
| Class | |
Result from running maintenance tasks. |
| Class | |
Maintenance schedule types. |
| Class | |
Base class for maintenance tasks. |
| Class | |
Pack-refs maintenance task. |
| Class | |
Prefetch maintenance task. |
| Function | get |
Get list of enabled maintenance tasks. |
| Function | register |
Register a repository for background maintenance. |
| Function | run |
Run maintenance tasks on a repository. |
| Function | unregister |
Unregister a repository from background maintenance. |
| Constant | MAINTENANCE |
Undocumented |
| Variable | logger |
Undocumented |
Register a repository for background maintenance.
This adds the repository to the global maintenance.repo config and sets up recommended configuration for scheduled maintenance.
| Parameters | |
repo:Repo | Repository to register |
def run_maintenance(repo:
BaseRepo, tasks: list[ str] | None = None, auto: bool = False, progress: Callable[ [ str], None] | None = None) -> MaintenanceResult:
¶
Run maintenance tasks on a repository.
| Parameters | |
repo:BaseRepo | Repository object |
tasks:list[ | Optional list of specific task names to run |
auto:bool | If True, only run tasks if needed |
progress:Callable[ | Optional progress callback |
| Returns | |
MaintenanceResult | MaintenanceResult with task execution results |
Unregister a repository from background maintenance.
This removes the repository from the global maintenance.repo config.
| Parameters | |
repo:Repo | Repository to unregister |
force:bool | If True, don't error if repository is not registered |
| Raises | |
ValueError | If repository is not registered and force is False |
Undocumented
| Value |
|