async fn scan_untracked(
cwd: &Path,
budget: Duration,
) -> (Vec<FileHunks>, bool, usize)Expand description
Read untracked files from git ls-files --others --exclude-standard and synthesise a FileHunks for each one
(status Untracked, single all-added
hunk). Caps total count at MAX_UNTRACKED_FILES - when the
working tree has more untracked entries than that, returns an
empty Vec so a fresh-repo state doesn’t dump hundreds of files
into the overlay.
Returns (files, ok, suppressed):
ok = falseonly when the underlyingls-filessubprocess hitFailed/Oversize. The cap-exceeded path keepsok = truebecause git ran fine.suppressedis the count of untracked files that didn’t make it intofilesdue toMAX_UNTRACKED_FILES. Zero when the tree was under the cap (or empty); positive when the cap kicked in so the renderer can surface the truncation count.