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

Method DoTransfer

tq/ssh.go:176–186  ·  view source on GitHub ↗

DoTransfer performs a single transfer within a worker. ctx is any context returned from WorkerStarting

(ctx interface{}, t *Transfer, cb ProgressCallback, authOkFunc func())

Source from the content-addressed store, hash-verified

174
175// DoTransfer performs a single transfer within a worker. ctx is any context returned from WorkerStarting
176func (a *SSHAdapter) DoTransfer(ctx interface{}, t *Transfer, cb ProgressCallback, authOkFunc func()) error {
177 if authOkFunc != nil {
178 authOkFunc()
179 }
180 workerNum := ctx.(int)
181 if a.adapterBase.direction == Upload {
182 return a.upload(t, workerNum, cb)
183 } else {
184 return a.download(t, workerNum, cb)
185 }
186}
187
188func (a *SSHAdapter) download(t *Transfer, workerNum int, cb ProgressCallback) error {
189 rel, err := t.Rel("download")

Callers

nothing calls this directly

Calls 2

uploadMethod · 0.95
downloadMethod · 0.95

Tested by

no test coverage detected