MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / should_ignore_untracked

Function should_ignore_untracked

atomic-agent/src/record/provenance.rs:364–381  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

362const HIDDEN_DIR_WHITELIST: &[&str] = &[".vault", ".atomicignore"];
363
364pub(crate) fn should_ignore_untracked(path: &str) -> bool {
365 for component in std::path::Path::new(path).components() {
366 if let std::path::Component::Normal(name) = component {
367 let name_str = name.to_string_lossy();
368 if AUTO_ADD_IGNORE_DIRS.contains(&name_str.as_ref()) {
369 return true;
370 }
371 // Skip hidden directories (starting with .) unless whitelisted
372 if name_str.starts_with('.')
373 && name_str.len() > 1
374 && !HIDDEN_DIR_WHITELIST.contains(&name_str.as_ref())
375 {
376 return true;
377 }
378 }
379 }
380 false
381}

Callers 1

record_turnFunction · 0.85

Calls 3

as_refMethod · 0.80
containsMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected