MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / checkGitRepository

Method checkGitRepository

git/git.go:124–131  ·  view source on GitHub ↗

checkGitRepository generates the git command to check if the current directory is a git repository.

(ctx context.Context)

Source from the content-addressed store, hash-verified

122
123// checkGitRepository generates the git command to check if the current directory is a git repository.
124func (c *Command) checkGitRepository(ctx context.Context) *exec.Cmd {
125 return exec.CommandContext(
126 ctx,
127 "git",
128 "rev-parse",
129 "--is-inside-work-tree",
130 )
131}
132
133// commit generates the git command to create a commit with the provided message.
134// It includes options to skip pre-commit hooks, sign off the commit, and handle amendments.

Callers 1

CanExecuteGitDiffMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected