pub fn apply_patch_to_index( patch: &str, mode: &ApplyMode, index_path: &Path, ) -> Result<()>
Apply a patch using git apply against a specific index file.