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