MCPcopy
hub / github.com/cli/cli / revParse

Method revParse

git/client.go:695–702  ·  view source on GitHub ↗
(ctx context.Context, args ...string)

Source from the content-addressed store, hash-verified

693}
694
695func (c *Client) revParse(ctx context.Context, args ...string) ([]byte, error) {
696 args = append([]string{"rev-parse"}, args...)
697 cmd, err := c.Command(ctx, args...)
698 if err != nil {
699 return nil, err
700 }
701 return cmd.Output()
702}
703
704func (c *Client) IsLocalGitRepo(ctx context.Context) (bool, error) {
705 _, err := c.GitDir(ctx)

Callers 5

PushRevisionMethod · 0.95
HasLocalBranchMethod · 0.95
ToplevelDirMethod · 0.95
GitDirMethod · 0.95
PathFromRootMethod · 0.95

Calls 2

CommandMethod · 0.95
OutputMethod · 0.65

Tested by

no test coverage detected