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

Method encodeHeader

plumbing/format/idxfile/encoder.go:47–54  ·  view source on GitHub ↗
(idx *MemoryIndex)

Source from the content-addressed store, hash-verified

45}
46
47func (e *Encoder) encodeHeader(idx *MemoryIndex) (int, error) {
48 c, err := e.Write(idxHeader)
49 if err != nil {
50 return c, err
51 }
52
53 return c + 4, binary.WriteUint32(e, idx.Version)
54}
55
56func (e *Encoder) encodeFanout(idx *MemoryIndex) (int, error) {
57 for _, c := range idx.Fanout {

Callers

nothing calls this directly

Calls 2

WriteUint32Function · 0.92
WriteMethod · 0.45

Tested by

no test coverage detected