(hash, repoDir string)
| 340 | } |
| 341 | |
| 342 | func CommitDiff(hash, repoDir string) (string, error) { |
| 343 | // unified diff without a commit header |
| 344 | cmd := exec.Command("git", "show", "--pretty=format:", "--patch", hash) |
| 345 | if repoDir != "" { |
| 346 | cmd.Dir = repoDir |
| 347 | } |
| 348 | out, err := cmd.Output() |
| 349 | if err != nil { |
| 350 | return "", err |
| 351 | } |
| 352 | return string(out), nil |
| 353 | } |
no outgoing calls
no test coverage detected