Skip to main content

capture_commit_content

Function capture_commit_content 

Source
pub fn capture_commit_content(
    context: &GitContext,
    cwd: &Path,
    git_dir: &Path,
    directory: &Path,
    indexes: &CaptureIndexes,
    mode: TransactionMode,
    stages_worktree: bool,
    base_revision: &str,
    next_sequence_before_base: i64,
    capture: impl FnOnce() -> Result<(), CaptureOrderError>,
) -> Result<CapturedRecord, CaptureOrderError>
Expand description

What: Runs the capture under capture order and journals it. Why: The sequence is taken before the capture reads any bytes, and captured.json is written only after the worktree listing is known.

In TS you’d write (pseudocode):

await captureCommitContent({ gitPath, cwd, gitDir, workspace, mode, stagesWorktree, baseRevision, nextSequenceBeforeBase, capture });