Skip to main content

resolve_conflict_hunk

Function resolve_conflict_hunk 

Source
pub fn resolve_conflict_hunk(
    repo_path: &Path,
    file_path: &str,
    hunk_idx: usize,
    accept_ours: bool,
) -> Result<(), String>
Expand description

Resolve a specific conflict hunk inside a file (Ours vs Theirs). Replaces the hunk at index hunk_idx in the file on disk. If no more conflicts remain in the file, it automatically stages the file.