From c979b22771f9574b339092f0aa727c7e0ede3941 Mon Sep 17 00:00:00 2001 From: yuanyan3060 <1846865993@qq.com> Date: Tue, 4 Mar 2025 15:04:01 +0800 Subject: [PATCH] Added index_conflict_remove --- src/index.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.rs b/src/index.rs index 712c7f887b..5625ba91ac 100644 --- a/src/index.rs +++ b/src/index.rs @@ -518,6 +518,15 @@ impl Index { Ok(()) } + /// Removes the index entries that represent a conflict of a single file. + pub fn conflict_remove(&mut self, path: &Path) -> Result<(), Error> { + let path = path_to_repo_path(path)?; + unsafe { + try_call!(raw::git_index_conflict_remove(self.raw, path)); + } + Ok(()) + } + /// Remove all matching index entries. /// /// If you provide a callback function, it will be invoked on each matching