MCPcopy Create free account
hub / github.com/go-git/go-git / Decode

Method Decode

plumbing/format/index/decoder.go:334–351  ·  view source on GitHub ↗
(t *Tree)

Source from the content-addressed store, hash-verified

332}
333
334func (d *treeExtensionDecoder) Decode(t *Tree) error {
335 for {
336 e, err := d.readEntry()
337 if err != nil {
338 if err == io.EOF {
339 return nil
340 }
341
342 return err
343 }
344
345 if e == nil {
346 continue
347 }
348
349 t.Entries = append(t.Entries, *e)
350 }
351}
352
353func (d *treeExtensionDecoder) readEntry() (*TreeEntry, error) {
354 e := &TreeEntry{}

Callers

nothing calls this directly

Calls 1

readEntryMethod · 0.95

Tested by

no test coverage detected