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

Method encodeAdditionalWants

plumbing/protocol/packp/ulreq_encode.go:70–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70func (e *ulReqEncoder) encodeAdditionalWants() stateFn {
71 last := e.data.Wants[0]
72 for _, w := range e.data.Wants[1:] {
73 if bytes.Equal(last[:], w[:]) {
74 continue
75 }
76
77 if err := e.pe.Encodef("want %s\n", w); err != nil {
78 e.err = fmt.Errorf("encoding want %q: %s", w, err)
79 return nil
80 }
81
82 last = w
83 }
84
85 return e.encodeShallows
86}
87
88func (e *ulReqEncoder) encodeShallows() stateFn {
89 plumbing.HashesSort(e.data.Shallows)

Callers

nothing calls this directly

Calls 1

EncodefMethod · 0.80

Tested by

no test coverage detected