(remote, branch string)
| 4879 | } |
| 4880 | |
| 4881 | func 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 | |
| 4891 | type remoteBranch struct { |
| 4892 | Remote string |
no outgoing calls
no test coverage detected