aboutsummaryrefslogtreecommitdiffstats
path: root/skate/zippy.go
diff options
context:
space:
mode:
Diffstat (limited to 'skate/zippy.go')
-rw-r--r--skate/zippy.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/skate/zippy.go b/skate/zippy.go
index beae483..1e660da 100644
--- a/skate/zippy.go
+++ b/skate/zippy.go
@@ -390,7 +390,8 @@ func matchedRefsExtend(matched []*BiblioRef, refs []*Ref) []*BiblioRef {
}
// uniqueMatches takes a list of bref docs (unserialized) and will return a
-// list of deserialized bref docs, containing unique matches only.
+// list of deserialized bref docs, containing unique matches only (e.g. filter
+// out things duplicate matches, e.g. from exact and fuzzy).
func uniqueMatches(docs []string) (result []*BiblioRef, err error) {
var (
brefs []*BiblioRef
@@ -402,7 +403,7 @@ func uniqueMatches(docs []string) (result []*BiblioRef, err error) {
}
brefs = append(brefs, &bref)
}
- // Make sure we exact matches come first.
+ // Make sure exact matches come first.
sort.Slice(brefs, func(i, j int) bool {
return brefs[i].MatchStatus != StatusExact.Short()
})
@@ -414,6 +415,7 @@ func uniqueMatches(docs []string) (result []*BiblioRef, err error) {
for _, doc := range brefs {
v := hash(doc)
if seen.Contains(v) {
+ log.Printf("skip: %v %v %v", doc.SourceReleaseIdent, doc.MatchStatus, doc.MatchReason)
continue
}
seen.Add(v)