mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-10-28 16:45:17 +08:00
* fix(scan): match --path selectors case-insensitively On Windows and macOS a --path selector such as SRC names an existing directory (the filesystem resolves it), but filterByPaths compared selectors to git ls-files output byte-for-byte, so the scan silently selected no files and exited 0. Fold case like the other user-facing path filters (--include/--exclude, secret paths, the extension allowlist). Refs #1708 * fix(scan): prefer the exact --path spelling before folding case A selector now matches its own spelling first, so on a case-sensitive filesystem --path src cannot widen to a sibling SRC/; case-insensitive matching stays as a per-selector fallback, the repair for --path SRC on Windows and macOS. Documented on the ocr scan page in all locales. * fix(scan): resolve --path against the filesystem before folding case A selector's own spelling is tried first; a spelling that names nothing must resolve in the working tree before case folding applies, so on a case-sensitive filesystem a wrongly-cased --path is an error instead of a folded match or a silent empty scan. Docs updated in all locales. * fix(scan): resolve --path selectors to their on-disk path A selector that names nothing in its own spelling is resolved against the working tree -- symlinks followed, on-disk case taken where the filesystem folds it -- and only the resolved path is matched, replacing the case-fold fallback. An empty src/docs/ therefore selects nothing on a case-sensitive filesystem even while src/DOCS/ holds tracked files. --------- Co-authored-by: Kite <254839944+lizhengfeng101@users.noreply.github.com>