···2020 which supports cancellation).
2121- Query primitive `RepoSet` to efficiently specify a set of repositories to
2222 search.
2323-- We vendor in all dependencies.
2423- Allow empty shard directories on startup. Needed when starting a fresh
2524 instance which hasn't indexed anything yet.
2625- We can return symbol/ctag data in results. Additionally we can run symbol regex queries.
+7
cmd/zoekt-sourcegraph-indexserver/index.go
···170170 "-submodules=false",
171171 }
172172173173+ // Note: we ignore o.Commit, we just fetch/clone the branch. This means the
174174+ // commit could be different (due to the branch being updated). This is not
175175+ // an issue since this commit will be more up to date. Additionally we will
176176+ // eventually converge thanks to the -incremental check. The only downside
177177+ // is the log message for indexing may report we indexed a different commit
178178+ // than we actually did.
179179+173180 // Even though we check for incremental in this process, we still pass it
174181 // in just in case we regress in how we check in process. We will still
175182 // notice thanks to metrics and increased load on gitserver.
+3-1
gitindex/index.go
···315315func expandBranches(repo *git.Repository, bs []string, prefix string) ([]string, error) {
316316 var result []string
317317 for _, b := range bs {
318318- if b == "HEAD" {
318318+ // Sourcegraph: We disable resolving refs. We want to return the exact ref
319319+ // requested so we can match it up.
320320+ if b == "HEAD" && false {
319321 ref, err := repo.Head()
320322 if err != nil {
321323 return nil, err