Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 6faf286

Browse files
committed
packfile: add comment on GetSizeByOffset
Suggested by mcuadros. Issue: #982 Signed-off-by: Jeremy Stribling <[email protected]>
1 parent b3a3f0a commit 6faf286

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plumbing/format/packfile/packfile.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ func (p *Packfile) GetByOffset(o int64) (plumbing.EncodedObject, error) {
9090
return p.nextObject()
9191
}
9292

93+
// GetSizeByOffset retrieves the size of the encoded object from the
94+
// packfile with the given offset.
9395
func (p *Packfile) GetSizeByOffset(o int64) (size int64, err error) {
9496
if _, err := p.s.SeekFromStart(o); err != nil {
9597
if err == io.EOF || isInvalid(err) {

0 commit comments

Comments
 (0)