Whether a tracked path has working-copy edits that deleting it would destroy. This is the guard `git rm` applies before removing a file with local changes. Only content-bearing differences count: `Deleted` means the bytes are already gone, and a path absent from the status result is not something this call can destroy. # Example ```rust,ignore if repo.has_uncommitted_edits(working_copy, Path::n
(
&self,
working_copy: WorkingCopyId,
path: &Path,
)
| 1204 | /// } |
| 1205 | /// ``` |
| 1206 | pub fn has_uncommitted_edits( |
| 1207 | &self, |
| 1208 | working_copy: WorkingCopyId, |
| 1209 | path: &Path, |
| 1210 | ) -> Result<bool, RepositoryError> { |
| 1211 | let options = StatusOptions { |
| 1212 | include_untracked: false, |
| 1213 | path_filters: vec![path.to_path_buf()], |
| 1214 | ..StatusOptions::default() |
| 1215 | }; |
| 1216 | let status = self.status(working_copy, options)?; |
| 1217 | Ok(status.get(path).is_some_and(|entry| { |
| 1218 | matches!( |
| 1219 | entry.status(), |
| 1220 | FileStatus::Modified |
| 1221 | | FileStatus::Conflicted |
| 1222 | | FileStatus::TypeChanged |
| 1223 | | FileStatus::PermissionsChanged |
| 1224 | ) |
| 1225 | })) |
| 1226 | } |
| 1227 | |
| 1228 | /// Get only modified files. |
| 1229 | pub fn modified_files( |
no test coverage detected