()
| 4988 | } |
| 4989 | |
| 4990 | func currentGitBranch() (string, error) { |
| 4991 | out, err := exec.Command("git", "rev-parse", "--abbrev-ref", "HEAD").Output() |
| 4992 | if err != nil { |
| 4993 | trimmed := strings.TrimSpace(string(out)) |
| 4994 | if trimmed != "" { |
| 4995 | return "", fmt.Errorf("%s", trimmed) |
| 4996 | } |
| 4997 | return "", fmt.Errorf("git rev-parse --abbrev-ref HEAD: %w", err) |
| 4998 | } |
| 4999 | |
| 5000 | branch := strings.TrimSpace(string(out)) |
| 5001 | return branch, nil |
| 5002 | } |
| 5003 | |
| 5004 | func urlsEquivalent(a, b string) bool { |
| 5005 | na := normalizeRemoteURL(a) |
no outgoing calls
no test coverage detected