(dir string, version string, args ...string)
| 362 | } |
| 363 | |
| 364 | func 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…