(from, to, commit string)
| 120 | } |
| 121 | |
| 122 | func normalizeDiffTarget(from, to, commit string) string { |
| 123 | if from != "" && to == "" && commit == "" { |
| 124 | return "HEAD" |
| 125 | } |
| 126 | return to |
| 127 | } |
| 128 | |
| 129 | func validateReviewOptions(opts *reviewOptions) error { |
| 130 | opts.to = normalizeDiffTarget(opts.from, opts.to, opts.commit) |
no outgoing calls
no test coverage detected