MCPcopy Create free account
hub / github.com/alibaba/open-code-review / normalizeDiffTarget

Function normalizeDiffTarget

cmd/opencodereview/shared_flags.go:122–127  ·  view source on GitHub ↗
(from, to, commit string)

Source from the content-addressed store, hash-verified

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

Callers 2

validateReviewOptionsFunction · 0.85
validateDelegateOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected