(ref *git.Ref, remote, id string, force bool)
| 167 | } |
| 168 | |
| 169 | func (c *sshLockClient) Unlock(ref *git.Ref, remote, id string, force bool) (*unlockResponse, int, error) { |
| 170 | args := make([]string, 0, 3) |
| 171 | if ref != nil { |
| 172 | args = append(args, fmt.Sprintf("refname=%s", ref.Name)) |
| 173 | } |
| 174 | conn, err := c.connection() |
| 175 | if err != nil { |
| 176 | return nil, 0, err |
| 177 | } |
| 178 | conn.Lock() |
| 179 | defer conn.Unlock() |
| 180 | err = conn.SendMessage(fmt.Sprintf("unlock %s", id), args) |
| 181 | if err != nil { |
| 182 | return nil, 0, err |
| 183 | } |
| 184 | status, args, lines, err := conn.ReadStatusWithLines() |
| 185 | if err != nil { |
| 186 | return nil, status, err |
| 187 | |
| 188 | } |
| 189 | var lock unlockResponse |
| 190 | lock.Lock, lock.Message, err = c.parseLockResponse(status, args, lines) |
| 191 | return &lock, status, err |
| 192 | } |
| 193 | |
| 194 | func (c *sshLockClient) Search(remote string, searchReq *lockSearchRequest) (*lockList, int, error) { |
| 195 | values := searchReq.QueryValues() |
nothing calls this directly
no test coverage detected