Fetch performs a fetch with no arguments against the given remotes.
(remotes ...string)
| 1379 | |
| 1380 | // Fetch performs a fetch with no arguments against the given remotes. |
| 1381 | func Fetch(remotes ...string) error { |
| 1382 | if len(remotes) == 0 { |
| 1383 | return nil |
| 1384 | } |
| 1385 | |
| 1386 | var args []string |
| 1387 | if len(remotes) > 1 { |
| 1388 | args = []string{"--multiple", "--"} |
| 1389 | } |
| 1390 | args = append(args, remotes...) |
| 1391 | |
| 1392 | _, err := gitNoLFSSimple(append([]string{"fetch"}, args...)...) |
| 1393 | return err |
| 1394 | } |
| 1395 | |
| 1396 | // RemoteRefs returns a list of branches and, optionally, tags for a remote |
| 1397 | // by actually accessing the remote via git ls-remote. |
no test coverage detected