MCPcopy Index your code
hub / github.com/nikivdev/go / gitRemoteHasBranch

Function gitRemoteHasBranch

cli/flow/main.go:4881–4889  ·  view source on GitHub ↗
(remote, branch string)

Source from the content-addressed store, hash-verified

4879}
4880
4881func gitRemoteHasBranch(remote, branch string) (bool, error) {
4882 cmd := exec.Command("git", "ls-remote", "--heads", remote, branch)
4883 out, err := cmd.Output()
4884 if err != nil {
4885 return false, fmt.Errorf("git ls-remote %s %s: %w", remote, branch, err)
4886 }
4887
4888 return strings.TrimSpace(string(out)) != "", nil
4889}
4890
4891type remoteBranch struct {
4892 Remote string

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected