MCPcopy Index your code
hub / github.com/go-git/go-git / decodeSizeByteReader

Function decodeSizeByteReader

plumbing/format/packfile/patch_delta.go:525–542  ·  view source on GitHub ↗
(cmd byte, delta io.ByteReader)

Source from the content-addressed store, hash-verified

523}
524
525func decodeSizeByteReader(cmd byte, delta io.ByteReader) (uint, error) {
526 var sz uint
527 for _, s := range sizes {
528 if (cmd & s.mask) != 0 {
529 next, err := delta.ReadByte()
530 if err != nil {
531 return 0, err
532 }
533 sz |= uint(next) << s.shift
534 }
535 }
536
537 if sz == 0 {
538 sz = maxCopySize
539 }
540
541 return sz, nil
542}
543
544func decodeSize(cmd byte, delta []byte) (uint, []byte, error) {
545 var sz uint

Callers 2

ReaderFromDeltaFunction · 0.85
patchDeltaWriterFunction · 0.85

Calls 1

ReadByteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…