Skip to content

Commit

Permalink
Remove branchMap in prepareNormalBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jtibshirani committed Sep 27, 2024
1 parent 64f1ad8 commit 0dd2d2f
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 98 deletions.
12 changes: 6 additions & 6 deletions cmd/zoekt-repo-index/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func main() {
}
}

perBranch := map[string]map[fileKey]gitindex.BlobLocation{}
perBranch := map[string]map[fileKey]gitindex.BlobRepo{}
opts.SubRepositories = map[string]*zoekt.Repository{}

// branch => repo => version
Expand All @@ -193,7 +193,7 @@ func main() {
}

perBranch[br.branch] = files
for key, loc := range files {
for key, repo := range files {
_, ok := opts.SubRepositories[key.SubRepoPath]
if ok {
// This can be incorrect: if the layout of manifests
Expand All @@ -204,8 +204,8 @@ func main() {
}

desc := &zoekt.Repository{}
if err := gitindex.SetTemplatesFromOrigin(desc, loc.URL); err != nil {
log.Fatalf("SetTemplatesFromOrigin(%s): %v", loc.URL, err)
if err := gitindex.SetTemplatesFromOrigin(desc, repo.URL); err != nil {
log.Fatalf("SetTemplatesFromOrigin(%s): %v", repo.URL, err)
}

opts.SubRepositories[key.SubRepoPath] = desc
Expand Down Expand Up @@ -325,8 +325,8 @@ func getManifest(repo *git.Repository, branch, path string) (*manifest.Manifest,
func iterateManifest(mf *manifest.Manifest,
baseURL url.URL, revPrefix string,
cache *gitindex.RepoCache,
) (map[fileKey]gitindex.BlobLocation, map[string]plumbing.Hash, error) {
allFiles := map[fileKey]gitindex.BlobLocation{}
) (map[fileKey]gitindex.BlobRepo, map[string]plumbing.Hash, error) {
allFiles := map[fileKey]gitindex.BlobRepo{}
allVersions := map[string]plumbing.Hash{}
for _, p := range mf.Project {
rev := mf.ProjectRevision(&p)
Expand Down
Loading

0 comments on commit 0dd2d2f

Please sign in to comment.