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

Method change_modified_paths

atomic-repository/src/repository/triage.rs:174–189  ·  view source on GitHub ↗

The file paths a change modifies, read directly from the change's own `file_ops` — authoritative and always present, so it needs no KG enrichment (`kg_enrich_*` derives its `MODIFIES` edges from exactly this source). Deduplicated and sorted. On a load failure this returns an empty `Vec` (best-effort): a single unreadable change must never error the whole triage.

(&self, hash: &Hash)

Source from the content-addressed store, hash-verified

172 /// On a load failure this returns an empty `Vec` (best-effort): a single
173 /// unreadable change must never error the whole triage.
174 pub fn change_modified_paths(&self, hash: &Hash) -> Result<Vec<String>, RepositoryError> {
175 let change = match self.load_change(hash) {
176 Ok(change) => change,
177 Err(_) => return Ok(Vec::new()),
178 };
179 let mut paths: Vec<String> = Vec::new();
180 for op in change.file_ops() {
181 let path = op.path();
182 if !path.is_empty() {
183 paths.push(path.to_string());
184 }
185 }
186 paths.sort();
187 paths.dedup();
188 Ok(paths)
189 }
190
191 /// Determine intent coverage for a single change.
192 ///

Callers 2

build_reportFunction · 0.80
change_coverageMethod · 0.80

Calls 6

sortMethod · 0.80
load_changeMethod · 0.45
file_opsMethod · 0.45
pathMethod · 0.45
is_emptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected