Remove functions

This commit is contained in:
Alexander Neumann 2016-09-01 21:26:21 +02:00
parent 5764b55aee
commit 0045f2fb61
2 changed files with 0 additions and 54 deletions

View File

@ -67,37 +67,6 @@ func debugPrintSnapshots(repo *repository.Repository, wr io.Writer) error {
return nil
}
// func printTrees(repo *repository.Repository, wr io.Writer) error {
// done := make(chan struct{})
// defer close(done)
// trees := []restic.ID{}
// for _, idx := range repo.Index().All() {
// for blob := range idx.Each(nil) {
// if blob.Type != pack.Tree {
// continue
// }
// trees = append(trees, blob.ID)
// }
// }
// for _, id := range trees {
// tree, err := restic.LoadTree(repo, id)
// if err != nil {
// fmt.Fprintf(os.Stderr, "LoadTree(%v): %v", id.Str(), err)
// continue
// }
// fmt.Fprintf(wr, "tree_id: %v\n", id)
// prettyPrintJSON(wr, tree)
// }
// return nil
// }
const dumpPackWorkers = 10
// Pack is the struct used in printPacks.
@ -228,8 +197,6 @@ func (cmd CmdDump) Execute(args []string) error {
return cmd.DumpIndexes()
case "snapshots":
return debugPrintSnapshots(repo, os.Stdout)
// case "trees":
// return printTrees(repo, os.Stdout)
case "packs":
return printPacks(repo, os.Stdout)
case "all":
@ -239,13 +206,6 @@ func (cmd CmdDump) Execute(args []string) error {
return err
}
// fmt.Printf("\ntrees:\n")
// err = printTrees(repo, os.Stdout)
// if err != nil {
// return err
// }
fmt.Printf("\nindexes:\n")
err = cmd.DumpIndexes()
if err != nil {

View File

@ -40,20 +40,6 @@ func (cmd CmdList) Execute(args []string) error {
var t restic.FileType
switch args[0] {
// case "blobs":
// restic.Lister
// err = repo.LoadIndex()
// if err != nil {
// return err
// }
// for _, idx := range repo.Index().All() {
// for blob := range idx.Each(nil) {
// cmd.global.Printf("%s\n", blob.ID)
// }
// }
// return nil
case "packs":
t = restic.DataFile
case "index":