diff --git a/internal/repository/repository.go b/internal/repository/repository.go index 01a7cad8a..cab0dda83 100644 --- a/internal/repository/repository.go +++ b/internal/repository/repository.go @@ -643,7 +643,6 @@ func (r *Repository) CreateIndexFromPacks(ctx context.Context, packsize map[rest return nil }) - idx := NewIndex() // a worker receives an pack ID from ch, reads the pack contents, and adds them to idx worker := func() error { for fi := range ch { @@ -654,7 +653,7 @@ func (r *Repository) CreateIndexFromPacks(ctx context.Context, packsize map[rest invalid = append(invalid, fi.ID) m.Unlock() } - idx.StorePack(fi.ID, entries) + r.idx.StorePack(fi.ID, entries) p.Add(1) } @@ -671,9 +670,6 @@ func (r *Repository) CreateIndexFromPacks(ctx context.Context, packsize map[rest return invalid, errors.Fatal(err.Error()) } - // Add idx to MasterIndex - r.idx.Insert(idx) - return invalid, nil }