Remove superseded history attribution paths
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user