docs: clarify --from/--to merge-base semantics (#579) - #613
Conversation
|
🔍 OpenCodeReview found 1 issue(s) in this PR.
|
Fixes alibaba#579. internal/diff/git.go's ModeRange computes the range via the two refs' merge-base, matching the CLI --help text (flags.go:206, 'merge-base mode'). The three Quickstart locales incorrectly described this as a..b (two-dot) comparison; README.md was ambiguous. All four now describe the actual merge-base behavior in plain language rather than relying on git dot-notation.
f5f41d3 to
b93d374
Compare
ReviewThe change itself is correct and valuable — I verified that Issue: Missing localized README updatesThe following localized README files contain the same outdated description but were not updated in this PR:
These should be updated to match the new merge-base description for consistency. Suggestion: PR titleThe current title "Fixes #579" is quite terse for commit history. Consider something like |
Addresses review feedback on alibaba#613 — zh-CN, ja-JP, ko-KR, ru-RU README comments still described the old (incorrect) two-dot comparison.
|
Good catch on the locale files pushed a fix for zh-CN, ja-JP, ko-KR and ru-RU with the same merge-base wording. I'm not a native speaker in any of the five non-English locales touched across this PR, so I'd really appreciate a native speaker sanity-checking the phrasing before merge. Also updated the PR title per your suggestion. |
Problem
Three sources documented
ocr review --from x --to yinconsistently:a..b) vs three-dot (a...b)semantics at all.
main..feature-branch(two-dot), which is wrong.--help(cmd/opencodereview/flags.go:206) — correctlydescribes it as "merge-base mode" (three-dot semantics).
Root cause confirmed
internal/diff/git.go'sModeRangecomputes the range via the tworefs' common ancestor (merge-base) — i.e. three-dot semantics, matching
the CLI help text. The Quickstart pages contradicted this.
Fix
Updated the single-line comment above
ocr review --from main --to feature-branchin all four affected files to describe the actualbehavior in plain language, rather than relying on git's
../...notation (which was the source of the original ambiguity):
README.mdpages/src/content/docs/en/quickstart.mdpages/src/content/docs/ja/quickstart.mdpages/src/content/docs/zh/quickstart.mdNo behavior change — documentation only.
flags.go's help text wasalready correct and untouched.
Note on translations
I'm not a native Japanese or Chinese speaker; I'd appreciate a quick
sanity check on the ja/zh wording from a maintainer or native speaker
before merge.