2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 19:38:57 +00:00

Remove 'cat tree' command

This commit is contained in:
Alexander Neumann 2017-01-30 10:48:50 +01:00
parent 41f59ffc78
commit 524ce01423

View File

@ -9,7 +9,6 @@ import (
"restic"
"restic/backend"
"restic/debug"
"restic/errors"
"restic/repository"
)
@ -184,23 +183,6 @@ func runCat(gopts GlobalOptions, args []string) error {
return errors.Fatal("blob not found")
case "tree":
debug.Log("cat tree %v", id.Str())
tree, err := repo.LoadTree(id)
if err != nil {
debug.Log("unable to load tree %v: %v", id.Str(), err)
return err
}
buf, err := json.MarshalIndent(&tree, "", " ")
if err != nil {
debug.Log("error json.MarshalIndent(): %v", err)
return err
}
_, err = os.Stdout.Write(append(buf, '\n'))
return nil
default:
return errors.Fatal("invalid type")
}