Collect all untracked files in the repository.
(
&self,
repo: &Repository,
working_copy: WorkingCopyId,
)
| 260 | |
| 261 | /// Collect all untracked files in the repository. |
| 262 | fn collect_untracked_files( |
| 263 | &self, |
| 264 | repo: &Repository, |
| 265 | working_copy: WorkingCopyId, |
| 266 | ) -> CliResult<Vec<PathBuf>> { |
| 267 | let status = repo |
| 268 | .status(working_copy, StatusOptions::default()) |
| 269 | .map_err(|e| CliError::Internal(e.into()))?; |
| 270 | |
| 271 | Ok(status.untracked().map(|e| e.path().to_path_buf()).collect()) |
| 272 | } |
| 273 | |
| 274 | /// Add a single path to tracking. |
| 275 | fn add_path( |