diff options
author | Antonio Jesus Navarro Perez <antonio@sourced.tech> | 2017-02-23 17:07:08 +0100 |
---|---|---|
committer | Antonio Jesus Navarro Perez <antonio@sourced.tech> | 2017-02-23 17:14:43 +0100 |
commit | 059a0be78399cdb0648bd514c5b179819d84403d (patch) | |
tree | 007fea2e8529b865b354b45c8aed9045e136d462 /plumbing/format/packfile/decoder.go | |
parent | b5da4e98571b02dc106de4f9b2cb2a298489f1b1 (diff) | |
download | go-git-059a0be78399cdb0648bd514c5b179819d84403d.tar.gz |
plumbing: improve documentation (Fix #242)
Diffstat (limited to 'plumbing/format/packfile/decoder.go')
-rw-r--r-- | plumbing/format/packfile/decoder.go | 7 |
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 |