(ctx context.Context)
| 765 | } |
| 766 | |
| 767 | func (c *Client) IsLocalGitRepo(ctx context.Context) (bool, error) { |
| 768 | _, err := c.GitDir(ctx) |
| 769 | if err != nil { |
| 770 | var execError errWithExitCode |
| 771 | if errors.As(err, &execError) && execError.ExitCode() == 128 { |
| 772 | return false, nil |
| 773 | } |
| 774 | return false, err |
| 775 | } |
| 776 | return true, nil |
| 777 | } |
| 778 | |
| 779 | // RemoteURL returns the fetch URL configured for the named remote. |
| 780 | func (c *Client) RemoteURL(ctx context.Context, name string) (string, error) { |
no test coverage detected