Skip to main content

hunk_diff_bundle

Function hunk_diff_bundle 

Source
pub fn hunk_diff_bundle(
    repo: &Repository,
    pathspecs: &[String],
    opts: DiffOptions,
) -> Result<HunkDiffBundle>
Expand description

Load unstaged diffs and the staged peer hunks on the same paths.

Literal file pathspecs only scan those paths (and skip the staged side when it matches HEAD); any other pathspec scans the whole index and filters.

ยงErrors

Propagates index, object database, and working tree read errors.