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