MCPcopy
hub / github.com/cli/cli / Fetch

Method Fetch

pkg/cmd/repo/sync/git.go:56–63  ·  view source on GitHub ↗
(remote, ref string)

Source from the content-addressed store, hash-verified

54}
55
56func (g *gitExecuter) Fetch(remote, ref string) error {
57 args := []string{"fetch", "-q", remote, ref}
58 cmd, err := g.client.AuthenticatedCommand(context.Background(), git.AllMatchingCredentialsPattern, args...)
59 if err != nil {
60 return err
61 }
62 return cmd.Run()
63}
64
65func (g *gitExecuter) HasLocalBranch(branch string) bool {
66 return g.client.HasLocalBranch(context.Background(), branch)

Callers

nothing calls this directly

Calls 2

AuthenticatedCommandMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected