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

Method HasLocalBranch

git/client.go:705–708  ·  view source on GitHub ↗
(ctx context.Context, branch string)

Source from the content-addressed store, hash-verified

703}
704
705func (c *Client) HasLocalBranch(ctx context.Context, branch string) bool {
706 _, err := c.revParse(ctx, "--verify", "refs/heads/"+branch)
707 return err == nil
708}
709
710func (c *Client) TrackingBranchNames(ctx context.Context, prefix string) []string {
711 args := []string{"branch", "-r", "--format", "%(refname:strip=3)"}

Callers

nothing calls this directly

Calls 1

revParseMethod · 0.95

Tested by

no test coverage detected