MCPcopy Create free account
hub / github.com/git-lfs/git-lfs / Fetch

Function Fetch

git/git.go:1381–1394  ·  view source on GitHub ↗

Fetch performs a fetch with no arguments against the given remotes.

(remotes ...string)

Source from the content-addressed store, hash-verified

1379
1380// Fetch performs a fetch with no arguments against the given remotes.
1381func 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.

Callers 1

fetchRemoteRefsFunction · 0.92

Calls 1

gitNoLFSSimpleFunction · 0.85

Tested by

no test coverage detected