Expand description
Cache directory management for git repositories.
Provides a Cargo-like caching structure:
~/.skilo/
├── config.toml
└── git/
├── checkouts/ # Working trees at specific commits
└── db/ # Bare git repositories (fetch targets)Structs§
- Cache
Stats - Get cache statistics.
- Cached
Checkout - Information about a checkout in checkouts/.
- Cached
Repo - Information about a cached repository in db/.
Functions§
- checkout_
name - Generate checkout directory name for a repo at a specific revision.
- checkouts_
dir - Get the checkouts directory (
~/.skilo/git/checkouts/). - clean_
all - Clean all cache (db + checkouts).
- clean_
old_ checkouts - Clean checkouts older than the given age in days.
- db_dir
- Get the bare repositories directory (
~/.skilo/git/db/). - db_name
- Generate db directory name for a repo.
- ensure_
dir - Ensure a directory exists, creating it if necessary.
- format_
size - Format bytes as human-readable string.
- git_dir
- Get the git cache directory.
- is_
offline - Check if offline mode is enabled via
SKILO_OFFLINEenvironment variable. - parse_
owner_ repo - Parse owner and repo from a git URL.
- skilo_
home - Get the skilo home directory.