mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 13:17:42 +00:00
repository: make CreateIndexFromPacks method private
This commit is contained in:
parent
04ad9f0c0c
commit
76e6719f2e
@ -92,7 +92,7 @@ func RepairIndex(ctx context.Context, repo *Repository, opts RepairIndexOptions,
|
||||
printer.P("reading pack files\n")
|
||||
bar := printer.NewCounter("packs")
|
||||
bar.SetMax(uint64(len(packSizeFromList)))
|
||||
invalidFiles, err := repo.CreateIndexFromPacks(ctx, packSizeFromList, bar)
|
||||
invalidFiles, err := repo.createIndexFromPacks(ctx, packSizeFromList, bar)
|
||||
bar.Done()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -656,10 +656,10 @@ func (r *Repository) LoadIndex(ctx context.Context, p *progress.Counter) error {
|
||||
return r.prepareCache()
|
||||
}
|
||||
|
||||
// CreateIndexFromPacks creates a new index by reading all given pack files (with sizes).
|
||||
// createIndexFromPacks creates a new index by reading all given pack files (with sizes).
|
||||
// The index is added to the MasterIndex but not marked as finalized.
|
||||
// Returned is the list of pack files which could not be read.
|
||||
func (r *Repository) CreateIndexFromPacks(ctx context.Context, packsize map[restic.ID]int64, p *progress.Counter) (invalid restic.IDs, err error) {
|
||||
func (r *Repository) createIndexFromPacks(ctx context.Context, packsize map[restic.ID]int64, p *progress.Counter) (invalid restic.IDs, err error) {
|
||||
var m sync.Mutex
|
||||
|
||||
debug.Log("Loading index from pack files")
|
||||
|
Loading…
Reference in New Issue
Block a user