Preserve inherited source origins and transfer evidence
This commit is contained in:
@@ -201,6 +201,23 @@ func originContainedBy(candidate, container Origin) bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if (len(candidate.contributors) == 0) != (len(container.contributors) == 0) {
|
||||
return false
|
||||
}
|
||||
for _, contributor := range candidate.contributors {
|
||||
found := false
|
||||
for _, available := range container.contributors {
|
||||
if contributor.location == available.location &&
|
||||
slices.Equal(contributor.source.segments, available.source.segments) &&
|
||||
sameInheritanceTrace(contributor.trace, available.trace) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user