MCPcopy
hub / github.com/cli/cli / localBranchExists

Function localBranchExists

pkg/cmd/pr/checkout/checkout.go:266–269  ·  view source on GitHub ↗
(client *git.Client, b string)

Source from the content-addressed store, hash-verified

264}
265
266func localBranchExists(client *git.Client, b string) bool {
267 _, err := client.ShowRefs(context.Background(), []string{"refs/heads/" + b})
268 return err == nil
269}
270
271func executeCmds(client *git.Client, credentialPattern git.CredentialPattern, cmdQueue [][]string) error {
272 for _, args := range cmdQueue {

Callers 1

cmdsForExistingRemoteFunction · 0.85

Calls 1

ShowRefsMethod · 0.80

Tested by

no test coverage detected