Skip to main content

commit_with_scope

Function commit_with_scope 

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

Record a commit using scope to decide how the index is prepared.

Staging reports crate::progress::ProgressPhase::StagingFiles to progress; cancel (or ProgressSink::should_cancel) stops the commit with Error::Cancelled up to the point the commit object is written, leaving HEAD and the branch where they were.

ยงErrors

Same as create_commit and commit_worktree, plus: