MCPcopy Create free account
hub / github.com/cli/cli / GitDir

Method GitDir

git/client.go:735–741  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

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

Calls 2

revParseMethod · 0.95
firstLineFunction · 0.70