(ctx context.Context, prefix string)
| 648 | } |
| 649 | |
| 650 | func (c *Client) TrackingBranchNames(ctx context.Context, prefix string) []string { |
| 651 | args := []string{"branch", "-r", "--format", "%(refname:strip=3)"} |
| 652 | if prefix != "" { |
| 653 | args = append(args, "--list", fmt.Sprintf("*/%s*", escapeGlob(prefix))) |
| 654 | } |
| 655 | cmd, err := c.Command(ctx, args...) |
| 656 | if err != nil { |
| 657 | return nil |
| 658 | } |
| 659 | output, err := cmd.Output() |
| 660 | if err != nil { |
| 661 | return nil |
| 662 | } |
| 663 | return strings.Split(string(output), "\n") |
| 664 | } |
| 665 | |
| 666 | // ToplevelDir returns the top-level directory path of the current repository. |
| 667 | func (c *Client) ToplevelDir(ctx context.Context) (string, error) { |
nothing calls this directly
no test coverage detected