forked from TrueCloudLab/restic
repository: make CreateIndexFromPacks method private
This commit is contained in:
parent
04ad9f0c0c
commit
76e6719f2e
2 changed files with 3 additions and 3 deletions
|
@ -92,7 +92,7 @@ func RepairIndex(ctx context.Context, repo *Repository, opts RepairIndexOptions,
|
||||||
printer.P("reading pack files\n")
|
printer.P("reading pack files\n")
|
||||||
bar := printer.NewCounter("packs")
|
bar := printer.NewCounter("packs")
|
||||||
bar.SetMax(uint64(len(packSizeFromList)))
|
bar.SetMax(uint64(len(packSizeFromList)))
|
||||||
invalidFiles, err := repo.CreateIndexFromPacks(ctx, packSizeFromList, bar)
|
invalidFiles, err := repo.createIndexFromPacks(ctx, packSizeFromList, bar)
|
||||||
bar.Done()
|
bar.Done()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -656,10 +656,10 @@ func (r *Repository) LoadIndex(ctx context.Context, p *progress.Counter) error {
|
||||||
return r.prepareCache()
|
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.
|
// The index is added to the MasterIndex but not marked as finalized.
|
||||||
// Returned is the list of pack files which could not be read.
|
// 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
|
var m sync.Mutex
|
||||||
|
|
||||||
debug.Log("Loading index from pack files")
|
debug.Log("Loading index from pack files")
|
||||||
|
|
Loading…
Reference in a new issue