Remove backend.Tree

This commit is contained in:
Alexander Neumann committed 2015-04-29 23:27:36 +02:00
1 parent 29ead95c96
commit ec108fb708
7 files changed
+8 -31

No files matched your search

+3 -5
View File
@@ -247,14 +247,12 @@ func BenchmarkLoadTree(t *testing.B) {
list := make([]backend.ID, 0, 10)
done := make(chan struct{})
for name := range s.List(backend.Tree, done) {
id, err := backend.ParseID(name)
if err != nil {
t.Logf("invalid id for tree %v", name)
for blob := range s.Index().Each(done) {
if blob.Type != pack.Tree {
continue
}
list = append(list, id)
list = append(list, blob.ID)
if len(list) == cap(list) {
close(done)
break