Skip to main content

staged_hunks

Function staged_hunks 

Source
pub async fn staged_hunks(
    root: &Path,
    wanted: fn(&Path) -> bool,
) -> Result<Vec<Hunk>, GitError>
Expand description

Hunks for the files staged for commit.

Same selection as staged_files--diff-filter=ACMR, empty-tree fallback when there is no HEAD — but the diff itself rather than the names. CONTEXT_LINES of context is requested so the model reading each hunk has the surrounding function body to compare against.