Skip to main content

plan_commit

Function plan_commit 

Source
pub fn plan_commit(
    repo: &Repository,
    req: &CommitRequest,
    scope: CommitScope,
    progress: &mut dyn ProgressSink,
    cancel: &dyn Cancel,
) -> Result<CommitPlan>
Expand description

Preview a commit for scope without mutating the repository (objects, index on disk, refs, hooks).

Uses in-memory blob hashing during staging (no new loose objects) and returns the same validation errors as commit_with_scope for unmerged index and nothing-to-commit.

ยงErrors

Same as commit_with_scope.