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

Configure Feed

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

zoekt-git-index: fix ParseGitModules BOM scanner to work with empty files

+3 -1
+2 -1
gitindex/submodule.go
··· 16 16 17 17 import ( 18 18 "bytes" 19 + "io" 19 20 20 21 "github.com/go-git/go-git/v5/plumbing/format/config" 21 22 ) ··· 35 36 // otherwise break the scanner. 36 37 // https://stackoverflow.com/a/21375405 37 38 r, _, err := buf.ReadRune() 38 - if err != nil { 39 + if err != nil && err != io.EOF { 39 40 return nil, err 40 41 } 41 42 if r != '\uFEFF' {
+1
gitindex/submodule_test.go
··· 47 47 Branch: ".", 48 48 }, 49 49 }}, 50 + {"", map[string]*SubmoduleEntry{}}, 50 51 } 51 52 52 53 for _, tc := range cases {