mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-10 01:39:12 +00:00
When ocr review runs from a subdirectory of a monorepo, the working dir differs from the git repository root. git diff emitted subdir-relative paths (with diff.relative) while the file_read tool's `git show <ref>:<path>` resolves paths relative to the repo root, so every file_read failed on the first try and only succeeded after the LLM retried with the repo-root prefix, wasting extra LLM calls (#287). Resolve the review working dir to `git rev-parse --show-toplevel` so diff and file_read agree on repo-root-relative paths. The scan path (requireGit=false) intentionally keeps the working-directory scope so scanning a subdirectory stays limited to it. |
||
|---|---|---|
| .. | ||
| opencodereview | ||