Remove superseded history attribution paths

This commit is contained in:
2026-10-26 18:11:04 +00:00
parent 6a1447c327
commit 3ffaef7ede
18 changed files with 146 additions and 534 deletions

View File

@@ -281,32 +281,3 @@ func resolveInheritanceAttribution(operation inheritanceOperation, destination P
}
return selections
}
func operationPathForQuery(root, query Path) Path {
if pathContains(query, root) {
return root
}
return query
}
func inheritanceChangesForQuery(query Path, operation inheritanceOperation) []Change {
if operation.control != nil {
for _, selection := range resolveInheritanceAttribution(operation, query) {
return []Change{{Path: selection.path.clone(), Origin: cloneOrigin(selection.origin), Dependencies: clonePaths(selection.dependencies)}}
}
return nil
}
if operation.transfer == nil {
return nil
}
path := operationPathForQuery(operation.transfer.to, query)
selections := resolveInheritanceAttribution(operation, path)
changes := make([]Change, 0, len(selections))
for _, selection := range selections {
if selection.kind == inheritanceEvidenceDisplaced {
continue
}
changes = append(changes, Change{Path: selection.path.clone(), Origin: cloneOrigin(selection.origin), Dependencies: clonePaths(selection.dependencies)})
}
return changes
}