aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/repository.go b/repository.go
index 5deddfb..d0bc103 100644
--- a/repository.go
+++ b/repository.go
@@ -19,7 +19,7 @@ const (
type Repository struct {
Remotes map[string]*Remote
- Storage *core.RAWObjectStorage
+ Storage core.ObjectStorage
URL string
}
@@ -100,15 +100,7 @@ func (r *Repository) Commit(h core.Hash) (*Commit, error) {
// Commits decode the objects into commits
func (r *Repository) Commits() *CommitIter {
- i := NewCommitIter(r)
- go func() {
- defer i.Close()
- for _, obj := range r.Storage.Commits {
- i.Add(obj)
- }
- }()
-
- return i
+ return NewCommitIter(r, r.Storage.Iter(core.CommitObject))
}
// Tree return the tree with the given hash