fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

matchtree: fix panic for missing files (#733)

Previously, shards crashed for queries like "foo type:file" if foo was
not present.

Test plan:
updated e2e test

+10
+6
matchtree.go
··· 1330 1330 } 1331 1331 case *fileNameMatchTree: 1332 1332 mt.child, err = pruneMatchTree(mt.child) 1333 + if err != nil { 1334 + return nil, err 1335 + } 1336 + if mt.child == nil { 1337 + return nil, nil 1338 + } 1333 1339 case *boostMatchTree: 1334 1340 mt.child, err = pruneMatchTree(mt.child) 1335 1341 if err != nil {
+4
web/e2e_test.go
··· 30 30 "time" 31 31 32 32 "github.com/google/go-cmp/cmp" 33 + 33 34 "github.com/sourcegraph/zoekt" 34 35 "github.com/sourcegraph/zoekt/query" 35 36 "github.com/sourcegraph/zoekt/rpc" ··· 136 137 }, 137 138 "/search?q=magic": { 138 139 `value=magic`, 140 + }, 141 + "/search?q=foo+type:file": { 142 + `value=foo`, 139 143 }, 140 144 "/robots.txt": { 141 145 "disallow: /search",