MCPcopy
hub / github.com/git-lfs/git-lfs / RunGitCommand

Function RunGitCommand

t/cmd/util/testutils.go:261–268  ·  view source on GitHub ↗

Simplistic fire & forget running of git command - returns combined output

(callback RepoCallback, failureCheck bool, args ...string)

Source from the content-addressed store, hash-verified

259
260// Simplistic fire & forget running of git command - returns combined output
261func RunGitCommand(callback RepoCallback, failureCheck bool, args ...string) string {
262 outp, err := exec.Command("git", args...).CombinedOutput()
263 if failureCheck && err != nil {
264 callback.Fatalf("Error running git command 'git %v': %v %v", strings.Join(args, " "), err, string(outp))
265 }
266 return string(outp)
267
268}
269
270// Input data for a single file in a commit
271type FileInput struct {

Callers 4

newRepoFunction · 0.85
AddToIndexMethod · 0.85
AddCommitsMethod · 0.85
AddRemoteMethod · 0.85

Calls 2

CombinedOutputMethod · 0.80
FatalfMethod · 0.65

Tested by

no test coverage detected