Add command rebuild-index

This commit is contained in:
Alexander Neumann committed 2015-10-25 17:24:52 +01:00
1 parent 9074c923ea
commit 6aed9f268b
3 files changed
+153

No files matched your search

+8
View File
@@ -52,8 +52,16 @@ func (cmd CmdCheck) Execute(args []string) error {
cmd.global.Verbosef("Load indexes\n")
hints, errs := chkr.LoadIndex()
dupFound := false
for _, hint := range hints {
cmd.global.Printf("%v\n", hint)
if _, ok := hint.(checker.ErrDuplicatePacks); ok {
dupFound = true
}
}
if dupFound {
cmd.global.Printf("\nrun `restic rebuild-index' to correct this\n")
}
if len(errs) > 0 {