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

Function configureBasicDownloadAdapter

tq/basic_download.go:265–278  ·  view source on GitHub ↗
(m *concreteManifest)

Source from the content-addressed store, hash-verified

263}
264
265func configureBasicDownloadAdapter(m *concreteManifest) {
266 m.RegisterNewAdapterFunc(BasicAdapterName, Download, func(name string, dir Direction) Adapter {
267 switch dir {
268 case Download:
269 bd := &basicDownloadAdapter{newAdapterBase(m.fs, name, dir, nil)}
270 // self implements impl
271 bd.transferImpl = bd
272 return bd
273 case Upload:
274 panic(tr.Tr.Get("Should never ask this function to upload"))
275 }
276 return nil
277 })
278}
279
280func (a *basicDownloadAdapter) makeRequest(t *Transfer, req *http.Request) (*http.Response, error) {
281 res, err := a.doHTTP(t, req)

Callers 1

newConcreteManifestFunction · 0.85

Calls 3

newAdapterBaseFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected