MCPcopy
hub / github.com/git-lfs/git-lfs / buildManifest

Function buildManifest

t/git-lfs-test-server-api/main.go:141–161  ·  view source on GitHub ↗
(r *t.Repo)

Source from the content-addressed store, hash-verified

139}
140
141func buildManifest(r *t.Repo) (tq.Manifest, error) {
142 // Configure the endpoint manually
143 finder := lfsapi.NewEndpointFinder(r)
144
145 var endp lfshttp.Endpoint
146 if len(cloneUrl) > 0 {
147 endp = finder.NewEndpointFromCloneURL("upload", cloneUrl)
148 } else {
149 endp = finder.NewEndpoint("upload", apiUrl)
150 }
151
152 apiClient, err := lfsapi.NewClient(r)
153 if err != nil {
154 return nil, err
155 }
156 apiClient.Endpoints = &constantEndpoint{
157 e: endp,
158 EndpointFinder: apiClient.Endpoints,
159 }
160 return tq.NewManifest(r.Filesystem(), apiClient, "", ""), nil
161}
162
163type constantEndpoint struct {
164 e lfshttp.Endpoint

Callers 1

testServerApiFunction · 0.85

Calls 6

NewEndpointMethod · 0.95
NewEndpointFinderFunction · 0.92
NewClientFunction · 0.92
NewManifestFunction · 0.92
FilesystemMethod · 0.45

Tested by

no test coverage detected