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

Method GitDir

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

Source from the content-addressed store, hash-verified

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