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

Method encodeFileHeader

plumbing/format/commitgraph/encoder.go:99–108  ·  view source on GitHub ↗
(chunkCount int)

Source from the content-addressed store, hash-verified

97}
98
99func (e *Encoder) encodeFileHeader(chunkCount int) (err error) {
100 if _, err = e.Write(commitFileSignature); err == nil {
101 version := byte(1)
102 if hash.CryptoType == crypto.SHA256 {
103 version = byte(2)
104 }
105 _, err = e.Write([]byte{1, version, byte(chunkCount), 0})
106 }
107 return
108}
109
110func (e *Encoder) encodeChunkHeaders(chunkSignatures [][]byte, chunkSizes []uint64) (err error) {
111 // 8 bytes of file header, 12 bytes for each chunk header and 12 byte for terminator

Callers 1

EncodeMethod · 0.95

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected