(remote string, vreq *lockVerifiableRequest)
| 224 | } |
| 225 | |
| 226 | func (c *sshLockClient) SearchVerifiable(remote string, vreq *lockVerifiableRequest) (*lockVerifiableList, int, error) { |
| 227 | args := make([]string, 0, 3) |
| 228 | if vreq.Ref != nil { |
| 229 | args = append(args, fmt.Sprintf("refname=%s", vreq.Ref.Name)) |
| 230 | } |
| 231 | if len(vreq.Cursor) > 0 { |
| 232 | args = append(args, fmt.Sprintf("cursor=%s", vreq.Cursor)) |
| 233 | } |
| 234 | if vreq.Limit > 0 { |
| 235 | args = append(args, fmt.Sprintf("limit=%d", vreq.Limit)) |
| 236 | } |
| 237 | conn, err := c.connection() |
| 238 | if err != nil { |
| 239 | return nil, 0, err |
| 240 | } |
| 241 | conn.Lock() |
| 242 | defer conn.Unlock() |
| 243 | err = conn.SendMessage("list-lock", args) |
| 244 | if err != nil { |
| 245 | return nil, 0, err |
| 246 | } |
| 247 | status, args, lines, err := conn.ReadStatusWithLines() |
| 248 | if err != nil { |
| 249 | return nil, status, err |
| 250 | } |
| 251 | _, ours, theirs, nextCursor, message, err := c.parseListLockResponse(status, args, lines) |
| 252 | if err != nil { |
| 253 | return nil, status, err |
| 254 | } |
| 255 | list := &lockVerifiableList{ |
| 256 | Ours: ours, |
| 257 | Theirs: theirs, |
| 258 | NextCursor: nextCursor, |
| 259 | Message: message, |
| 260 | } |
| 261 | return list, status, nil |
| 262 | } |
nothing calls this directly
no test coverage detected