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

Method Encode

plumbing/protocol/packp/ulreq_encode.go:35–48  ·  view source on GitHub ↗
(v *UploadRequest)

Source from the content-addressed store, hash-verified

33}
34
35func (e *ulReqEncoder) Encode(v *UploadRequest) error {
36 e.data = v
37
38 if len(v.Wants) == 0 {
39 return fmt.Errorf("empty wants provided")
40 }
41
42 plumbing.HashesSort(e.data.Wants)
43 for state := e.encodeFirstWant; state != nil; {
44 state = state()
45 }
46
47 return e.err
48}
49
50func (e *ulReqEncoder) encodeFirstWant() stateFn {
51 var err error

Callers

nothing calls this directly

Calls 1

HashesSortFunction · 0.92

Tested by

no test coverage detected