MCPcopy Create free account
hub / github.com/asim/git-http-backend / gitCommand

Function gitCommand

server/server.go:364–380  ·  view source on GitHub ↗
(dir string, version string, args ...string)

Source from the content-addressed store, hash-verified

362}
363
364func gitCommand(dir string, version string, args ...string) []byte {
365 command := exec.Command(DefaultConfig.GitBinPath, args...)
366 if len(version) > 0 {
367 command.Env = append(os.Environ(), fmt.Sprintf("GIT_PROTOCOL=%s", version))
368 }
369 command.Dir = dir
370
371 DefaultConfig.CommandFunc(command)
372
373 out, err := command.Output()
374
375 if err != nil {
376 log.Print(err)
377 }
378
379 return out
380}
381
382// HTTP error response handling functions
383

Callers 3

getInfoRefsFunction · 0.85
getGitConfigFunction · 0.85
updateServerInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…