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

Method revParse

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

Source from the content-addressed store, hash-verified

755}
756
757func (c *Client) revParse(ctx context.Context, args ...string) ([]byte, error) {
758 args = append([]string{"rev-parse"}, args...)
759 cmd, err := c.Command(ctx, args...)
760 if err != nil {
761 return nil, err
762 }
763 return cmd.Output()
764}
765
766func (c *Client) IsLocalGitRepo(ctx context.Context) (bool, error) {
767 _, 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