Skip to main content

pin_snapshot_worktree_state

Function pin_snapshot_worktree_state 

Source
pub fn pin_snapshot_worktree_state(
    snapshot: &mut ComposeSnapshot,
    dir: &str,
) -> Result<()>
Expand description

Pin each snapshot file’s worktree state into the object database.

Records (mode, oid) per path as of this moment, so whole-file staging later reproduces exactly this content regardless of subsequent worktree edits. Paths absent from the worktree are pinned as deletions.