Skip to main content

Crate cljrs_vcs

Crate cljrs_vcs 

Source
Expand description

Pure-Rust git helpers for versioned symbol resolution.

All git operations are performed in-process with gix (gitoxide); no git binary is required. Commit-signature verification is likewise native (see [signature]): PGP signatures are checked with rPGP and SSH signatures with ssh-key, against a caller-supplied set of TrustedKeys.

Remote fetch/clone over the network is HTTPS-only and fully pure-Rust (rustls). Local filesystem paths and file:// URLs are also supported (handled in-process). ssh:///scp-like remotes are fetched natively (no ssh binary) when the optional ssh feature is enabled (see the ssh module); without it they are rejected with a clear error. Other schemes (git://, http://) are unsupported.

Structs§

TrustedKeys
A cljrs-managed set of public keys trusted to sign commits.

Enums§

TrustedKeyError
Errors raised while loading a trusted public key.
VcsError

Functions§

cache_path_for_url
Return the local cache path for a given remote URL, without fetching.
cache_root
Returns the path to the local git-dep cache root: ~/.cljrs/cache/git/.
fetch_remote
Clone or fetch a git repository into the local cache.
find_repo_root
Walk upward from start (a file or directory) to find the root of the enclosing git repository, i.e. the working-tree root.
get_file_at_commit
Return the contents of rel_path (relative to the repo root) at commit.
is_valid_commit_hash
Returns true if s looks like a valid (abbreviated or full) commit hash: 7–40 lowercase or uppercase hex characters.
verify_commit_signature
Verify the PGP or SSH signature on commit inside repo_root against the caller-supplied set of trusted keys.

Type Aliases§

VcsResult