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

Method encodeFileHeader

plumbing/format/commitgraph/v2/encoder.go:113–122  ·  view source on GitHub ↗
(chunkCount int)

Source from the content-addressed store, hash-verified

111}
112
113func (e *Encoder) encodeFileHeader(chunkCount int) (err error) {
114 if _, err = e.Write(commitFileSignature); err == nil {
115 version := byte(1)
116 if hash.CryptoType == crypto.SHA256 {
117 version = byte(2)
118 }
119 _, err = e.Write([]byte{1, version, byte(chunkCount), 0})
120 }
121 return
122}
123
124func (e *Encoder) encodeChunkHeaders(chunkSignatures [][]byte, chunkSizes []uint64) (err error) {
125 // 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