(ctx context.Context)
| 673 | } |
| 674 | |
| 675 | func (c *Client) GitDir(ctx context.Context) (string, error) { |
| 676 | out, err := c.revParse(ctx, "--git-dir") |
| 677 | if err != nil { |
| 678 | return "", err |
| 679 | } |
| 680 | return firstLine(out), nil |
| 681 | } |
| 682 | |
| 683 | // Show current directory relative to the top-level directory of repository. |
| 684 | func (c *Client) PathFromRoot(ctx context.Context) string { |