aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/decoder.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-27 12:59:51 +0100
committerGitHub <noreply@github.com>2017-02-27 12:59:51 +0100
commita8f1e517e302569f11fced521c3f091997dac147 (patch)
tree16bbe6118340bfedf35080e66e44a76840fb3afb /plumbing/format/packfile/decoder.go
parent39f43b52a2bdfbc73703e2d09b575d49cd70ede8 (diff)
parent059a0be78399cdb0648bd514c5b179819d84403d (diff)
downloadgo-git-a8f1e517e302569f11fced521c3f091997dac147.tar.gz
Merge pull request #288 from ajnavarro/documentation/plumbing
plumbing: improve documentation (Fix #242)
Diffstat (limited to 'plumbing/format/packfile/decoder.go')
-rw-r--r--plumbing/format/packfile/decoder.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/plumbing/format/packfile/decoder.go b/plumbing/format/packfile/decoder.go
index 4e102c7..cd439b0 100644
--- a/plumbing/format/packfile/decoder.go
+++ b/plumbing/format/packfile/decoder.go
@@ -300,8 +300,11 @@ func (d *Decoder) newObject() plumbing.EncodedObject {
return d.o.NewEncodedObject()
}
-// DecodeObjectAt reads an object at the given location, if Decode wasn't called
-// previously objects offset should provided using the SetOffsets method
+// DecodeObjectAt reads an object at the given location. Every EncodedObject
+// returned is added into a internal index. This is intended to be able to regenerate
+// objects from deltas (offset deltas or reference deltas) without an package index
+// (.idx file). If Decode wasn't called previously objects offset should provided
+// using the SetOffsets method.
func (d *Decoder) DecodeObjectAt(offset int64) (plumbing.EncodedObject, error) {
if !d.s.IsSeekable {
return nil, ErrNonSeekable