MCPcopy Create free account
hub / github.com/cli/cli / Fetch

Method Fetch

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

Source from the content-addressed store, hash-verified

61}
62
63func (g *gitExecuter) Fetch(remote, ref string) error {
64 args := []string{"fetch", "-q", remote, ref}
65 cmd, err := g.client.AuthenticatedCommand(context.Background(), git.AllMatchingCredentialsPattern, args...)
66 if err != nil {
67 return err
68 }
69 return cmd.Run()
70}
71
72func (g *gitExecuter) HasLocalBranch(branch string) bool {
73 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