This commit is contained in:
2026-09-13 13:36:27 +07:00
parent f8277e4c2e
commit b3991810b6
77 changed files with 96 additions and 5189 deletions
+3 -5
View File
@@ -2,13 +2,11 @@ use std::path::{Path, PathBuf};
use ignore::WalkBuilder;
/// Maximum directory nesting depth when scanning for local repositories.
///
/// Pathological trees can't stall the scan.
/// Caps nesting so pathological trees can't stall the scan.
const SCAN_MAX_DEPTH: usize = 12;
/// Walk `root` recursively and collect the paths of git repositories below it,
/// honouring `.gitignore` (and `.ignore`) files.
/// Walk `root` recursively and collect the paths of git repositories below it.
/// `.gitignore` and `.ignore` files are honoured.
pub fn find_git_repos(root: &Path) -> Vec<PathBuf> {
if !root.is_dir() {
return Vec::new();