Skip to main content

snapshot

Function snapshot 

Source
pub fn snapshot(
    repo: &Repository,
    message: &str,
    timestamp_unix: i64,
) -> Result<SnapshotOutcome>
Expand description

Create a snapshot: scan the working tree, store content, write a manifest and commit, and advance the current branch (or detached HEAD).

timestamp_unix is supplied by the caller (the CLI passes the current time) so the core stays deterministic and easily testable.