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

Function notify_and_commit

atomic-repository/src/content_search.rs:40–45  ·  view source on GitHub ↗

Notify the index about a single changed file and commit immediately. This is the fastest path for keeping the index current after a single file edit — cheaper than a full rebuild or stale check.

(repo_root: &Path, changed_path: &Path)

Source from the content-addressed store, hash-verified

38/// This is the fastest path for keeping the index current after a single
39/// file edit — cheaper than a full rebuild or stale check.
40pub fn notify_and_commit(repo_root: &Path, changed_path: &Path) -> Result<(), ContentSearchError> {
41 let config = content_config(repo_root);
42 let index = Index::open(config)?;
43 index.notify_change_immediate(changed_path)?;
44 Ok(())
45}
46
47/// Search the content index.
48///

Callers

nothing calls this directly

Calls 1

content_configFunction · 0.85

Tested by

no test coverage detected