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