(ctx context.Context)
| 736 | } |
| 737 | |
| 738 | func (c *Client) GitDir(ctx context.Context) (string, error) { |
| 739 | out, err := c.revParse(ctx, "--git-dir") |
| 740 | if err != nil { |
| 741 | return "", err |
| 742 | } |
| 743 | return firstLine(out), nil |
| 744 | } |
| 745 | |
| 746 | // Show current directory relative to the top-level directory of repository. |
| 747 | func (c *Client) PathFromRoot(ctx context.Context) string { |