func (t *repoTree) write(w io.Writer, indent string) {
	for nm, ch := range t.children {
		fmt.Fprintf(w, "%s%s:\n", indent, nm)
		ch.write(w, indent+" ")
	}
}
write dumps the tree for debugging purposes.
package populate
import (
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"os"
	"path/filepath"
	"sort"
	"strings"
	"gopkg.in/src-d/go-git.v4/plumbing"
	"github.com/google/slothfs/gitiles"
	"github.com/google/slothfs/manifest"
)
type fileInfo struct {
	sha1 *plumbing.Hash
}
type repoTree struct {
	children map[string]*repoTree
	entries map[string]*fileInfo
	copied []string
}
func (t *repoTree) findParentRepo(path string) (*repoTree, string) {
	for k, ch := range t.children {
		if strings.HasPrefix(path, k+"/") {
			return ch.findParentRepo(path[len(k+"/"):])
		}
	}
	return t, path
}