mirror of
https://github.com/octoleo/restic.git
synced 2024-11-15 17:47:21 +00:00
Remove functions
This commit is contained in:
parent
5764b55aee
commit
0045f2fb61
@ -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 {
|
||||
|
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user