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

Function should_ignore_untracked

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

Source from the content-addressed store, hash-verified

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

Callers 1

record_turnFunction · 0.85

Calls 3

as_refMethod · 0.80
containsMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected