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

Method change_modified_paths

atomic-repository/src/repository/triage.rs:179–194  ·  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

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

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