Walk directory recursively (simple implementation).
(dir: &Path)
| 376 | |
| 377 | /// Walk directory recursively (simple implementation). |
| 378 | fn walkdir(dir: &Path) -> Vec<std::path::PathBuf> { |
| 379 | let mut files = Vec::new(); |
| 380 | if let Ok(entries) = std::fs::read_dir(dir) { |
| 381 | for entry in entries.filter_map(|e| e.ok()) { |
| 382 | let path = entry.path(); |
| 383 | if path.is_dir() { |
| 384 | files.extend(walkdir(&path)); |
| 385 | } else { |
| 386 | files.push(path); |
| 387 | } |
| 388 | } |
| 389 | } |
| 390 | files |
| 391 | } |
| 392 | |
| 393 | /// Run a git command. |
| 394 | fn run_git(repo_path: &Path, args: &[&str]) -> Result<(bool, String, String)> { |
no test coverage detected