Add and use MasterIndex

This commit is contained in:
Alexander Neumann committed 2015-10-12 22:34:12 +02:00
1 parent 64fa89d406
commit 86fcd170f6
10 files changed
+347 -108

No files matched your search

+10 -8
View File
@@ -209,15 +209,17 @@ func BenchmarkLoadTree(t *testing.B) {
list := make([]backend.ID, 0, 10)
done := make(chan struct{})
for blob := range repo.Index().Each(done) {
if blob.Type != pack.Tree {
continue
}
for _, idx := range repo.Index().All() {
for blob := range idx.Each(done) {
if blob.Type != pack.Tree {
continue
}
list = append(list, blob.ID)
if len(list) == cap(list) {
close(done)
break
list = append(list, blob.ID)
if len(list) == cap(list) {
close(done)
break
}
}
}