aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@gmail.com>2018-08-21 17:35:52 +0200
committerJavi Fontan <jfontan@gmail.com>2018-08-21 17:35:52 +0200
commitf84c6b194f2eced0c068b9cdc9264d30e6d2021b (patch)
treeed946f1da370426f6c6965d8e713a001df9f8924 /plumbing/format/packfile
parentcc27d4a1789f75586694ff042fc9ab4cbc8b1385 (diff)
downloadgo-git-f84c6b194f2eced0c068b9cdc9264d30e6d2021b.tar.gz
plumbing/idxfile: object iterators returns entries in offset order
In the latest change the order was changed from offset order in packfiles to hash order. This makes reading all the objects not as efficient as before. It also created problems when the previous order was expected. Also added EntriesByOffset to indexes. Signed-off-by: Javi Fontan <jfontan@gmail.com>
Diffstat (limited to 'plumbing/format/packfile')
-rw-r--r--plumbing/format/packfile/packfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/packfile/packfile.go b/plumbing/format/packfile/packfile.go
index 5feb781..18fcca7 100644
--- a/plumbing/format/packfile/packfile.go
+++ b/plumbing/format/packfile/packfile.go
@@ -394,7 +394,7 @@ func (p *Packfile) GetByType(typ plumbing.ObjectType) (storer.EncodedObjectIter,
plumbing.TreeObject,
plumbing.CommitObject,
plumbing.TagObject:
- entries, err := p.Entries()
+ entries, err := p.EntriesByOffset()
if err != nil {
return nil, err
}