Merge pull request #591 from viric/packs-not-files

On prune report, packs instead of files + fix counter
This commit is contained in:
Alexander Neumann 2016-08-27 21:57:09 +02:00
commit 93e62c6f18
1 changed files with 3 additions and 2 deletions

View File

@ -100,7 +100,7 @@ func (cmd CmdPrune) Execute(args []string) error {
cmd.global.Verbosef("building new index for repo\n") cmd.global.Verbosef("building new index for repo\n")
bar := newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "files") bar := newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "packs")
idx, err := index.New(repo, bar) idx, err := index.New(repo, bar)
if err != nil { if err != nil {
return err return err
@ -213,10 +213,11 @@ nextPack:
cmd.global.Verbosef("creating new index\n") cmd.global.Verbosef("creating new index\n")
stats.packs = 0
for _ = range repo.List(backend.Data, done) { for _ = range repo.List(backend.Data, done) {
stats.packs++ stats.packs++
} }
bar = newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "files") bar = newProgressMax(cmd.global.ShowProgress(), uint64(stats.packs), "packs")
idx, err = index.New(repo, bar) idx, err = index.New(repo, bar)
if err != nil { if err != nil {
return err return err