MCPcopy
hub / github.com/cli/cli / GitDir

Method GitDir

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

Source from the content-addressed store, hash-verified

673}
674
675func (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.
684func (c *Client) PathFromRoot(ctx context.Context) string {

Callers 4

TestClientGitDirFunction · 0.95
IsLocalGitRepoMethod · 0.95
localRepoTypeFunction · 0.80

Calls 2

revParseMethod · 0.95
firstLineFunction · 0.85

Tested by 1

TestClientGitDirFunction · 0.76