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

Configure Feed

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

gitindex: disable gogit optimization by default (#870)

We have seen issues on large repos so lets default to off until we fix
again.

+5 -3
+5 -3
gitindex/index.go
··· 17 17 18 18 import ( 19 19 "bytes" 20 + "cmp" 20 21 "context" 21 22 "errors" 22 23 "fmt" ··· 408 409 opts.BuildOptions.RepositoryDescription.Source = opts.RepoDir 409 410 410 411 var repo *git.Repository 411 - // TODO: remove this feature flag once we test this on a large-scale instance. 412 - legacyRepoOpen := os.Getenv("ZOEKT_DISABLE_GOGIT_OPTIMIZATION") 413 - if b, err := strconv.ParseBool(legacyRepoOpen); b && err == nil { 412 + // TODO: this now defaults to on since we found a bug in it. Once we have 413 + // fixed openRepo default to false. 414 + legacyRepoOpen := cmp.Or(os.Getenv("ZOEKT_DISABLE_GOGIT_OPTIMIZATION"), "true") 415 + if b, err := strconv.ParseBool(legacyRepoOpen); b || err != nil { 414 416 repo, err = git.PlainOpen(opts.RepoDir) 415 417 if err != nil { 416 418 return false, fmt.Errorf("git.PlainOpen: %w", err)