MCPcopy
hub / github.com/google/git-appraise / runGitCommand

Method runGitCommand

repository/git.go:71–80  ·  view source on GitHub ↗

Run the given git command and return its stdout, or an error if the command fails.

(args ...string)

Source from the content-addressed store, hash-verified

69
70// Run the given git command and return its stdout, or an error if the command fails.
71func (repo *GitRepo) runGitCommand(args ...string) (string, error) {
72 stdout, stderr, err := repo.runGitCommandRaw(args...)
73 if err != nil {
74 if stderr == "" {
75 stderr = "Error running git command: " + strings.Join(args, " ")
76 }
77 err = fmt.Errorf(stderr)
78 }
79 return stdout, err
80}
81
82// Run the given git command and return its stdout, or an error if the command fails.
83func (repo *GitRepo) runGitCommandWithEnv(env []string, args ...string) (string, error) {

Callers 15

HasObjectMethod · 0.95
GetRepoStateHashMethod · 0.95
GetUserEmailMethod · 0.95
GetUserSigningKeyMethod · 0.95
GetCoreEditorMethod · 0.95
GetSubmitStrategyMethod · 0.95
HasUncommittedChangesMethod · 0.95
VerifyCommitMethod · 0.95
VerifyGitRefMethod · 0.95
GetHeadRefMethod · 0.95
GetCommitHashMethod · 0.95
ResolveRefCommitMethod · 0.95

Calls 1

runGitCommandRawMethod · 0.95

Tested by

no test coverage detected