(ctx context.Context, prefix string)
| 710 | } |
| 711 | |
| 712 | func (c *Client) TrackingBranchNames(ctx context.Context, prefix string) []string { |
| 713 | args := []string{"branch", "-r", "--format", "%(refname:strip=3)"} |
| 714 | if prefix != "" { |
| 715 | args = append(args, "--list", fmt.Sprintf("*/%s*", escapeGlob(prefix))) |
| 716 | } |
| 717 | cmd, err := c.Command(ctx, args...) |
| 718 | if err != nil { |
| 719 | return nil |
| 720 | } |
| 721 | output, err := cmd.Output() |
| 722 | if err != nil { |
| 723 | return nil |
| 724 | } |
| 725 | return strings.Split(string(output), "\n") |
| 726 | } |
| 727 | |
| 728 | // ToplevelDir returns the top-level directory path of the current repository. |
| 729 | func (c *Client) ToplevelDir(ctx context.Context) (string, error) { |
nothing calls this directly
no test coverage detected