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

Method batchInternal

tq/ssh.go:27–44  ·  view source on GitHub ↗
(args []string, batchLines []string)

Source from the content-addressed store, hash-verified

25}
26
27func (a *SSHBatchClient) batchInternal(args []string, batchLines []string) (int, []string, []string, error) {
28 conn, err := a.transfer.Connection(0)
29 if err != nil {
30 return 0, nil, nil, errors.Wrap(err, tr.Tr.Get("could not get connection for batch request"))
31 }
32 conn.Lock()
33 defer conn.Unlock()
34 err = conn.SendMessageWithLines("batch", args, batchLines)
35 if err != nil {
36 return 0, nil, nil, errors.Wrap(err, tr.Tr.Get("batch request"))
37 }
38
39 status, args, lines, err := conn.ReadStatusWithLines()
40 if err != nil {
41 return status, nil, nil, errors.Wrap(err, tr.Tr.Get("batch response"))
42 }
43 return status, args, lines, err
44}
45
46func (a *SSHBatchClient) Batch(remote string, bReq *batchRequest) (*BatchResponse, error) {
47 bRes := &BatchResponse{TransferAdapterName: "ssh"}

Callers 1

BatchMethod · 0.95

Calls 7

WrapFunction · 0.92
ConnectionMethod · 0.80
SendMessageWithLinesMethod · 0.80
ReadStatusWithLinesMethod · 0.80
GetMethod · 0.65
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected