func GetTree(s storer.EncodedObjectStorer, h plumbing.Hash) (*Tree, error) {
	o, err := s.EncodedObject(plumbing.TreeObject, h)
	if err != nil {
		return nil, err
	}
	return DecodeTree(s, o)
}
GetTree gets a tree from an object storer and decodes it.
package object
import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"path"
	"strings"
	"gopkg.in/src-d/go-git.v4/plumbing"
	"gopkg.in/src-d/go-git.v4/plumbing/filemode"
	"gopkg.in/src-d/go-git.v4/plumbing/storer"
	"gopkg.in/src-d/go-git.v4/utils/ioutil"
)
const (
	maxTreeDepth      = 1024
	startingStackSize = 8
)
var (
	ErrMaxTreeDepth      = errors.New("maximum tree depth exceeded")
	ErrFileNotFound      = errors.New("file not found")
	ErrDirectoryNotFound = errors.New("directory not found")
)
type Tree struct {
	Entries []TreeEntry
	Hash    plumbing.Hash
	s storer.EncodedObjectStorer
	m map[string]*TreeEntry
}