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

Function encodeShallow

plumbing/protocol/packp/advrefs_encode.go:152–161  ·  view source on GitHub ↗

Adds the (sorted) shallows: "shallow" SP hash EOL

(e *advRefsEncoder)

Source from the content-addressed store, hash-verified

150
151// Adds the (sorted) shallows: "shallow" SP hash EOL
152func encodeShallow(e *advRefsEncoder) encoderStateFn {
153 sorted := sortShallows(e.data.Shallows)
154 for _, hash := range sorted {
155 if e.err = e.pe.Encodef("shallow %s\n", hash); e.err != nil {
156 return nil
157 }
158 }
159
160 return encodeFlush
161}
162
163func sortShallows(c []plumbing.Hash) []string {
164 ret := []string{}

Callers

nothing calls this directly

Calls 2

sortShallowsFunction · 0.85
EncodefMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…