Repository navigation
Refine merge filter handling in CLI - #1023
Conversation
There was a problem hiding this comment.
💡 Codex Review
Lines 4175 to 4180 in 616bed8
The refactored apply_merge_directive now reads merge files through read_merge_file (and the STDIN variant just below) which call fs::read_to_string/read_to_string. These APIs return an InvalidData error whenever the file contains bytes that are not valid UTF‑8. Prior code fed the file into read_filter_patterns, which used String::from_utf8_lossy and accepted arbitrary byte sequences. As a result, merge filters containing patterns encoded in the filesystem’s native encoding—or filenames with raw bytes—will now cause the CLI to error out before parsing. To preserve compatibility with existing rsync filters, the reader should operate on raw bytes and perform lossy decoding instead of requiring UTF‑8.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…#2048) (#3520) Investigation only - documents the current sender model, wire-ordering constraints from upstream rsync 3.4.1, existing reorder/workqueue infrastructure, a sketched fan-out design, a benchmark plan for the rsync-profile container, and risks. Recommends prototyping behind a feature flag with a benchmark gate before any wire-emitting code is touched. Distinct from #1023 (intra-file) and #1079 (receiver-side).
…#2048) (#3520) Investigation only - documents the current sender model, wire-ordering constraints from upstream rsync 3.4.1, existing reorder/workqueue infrastructure, a sketched fan-out design, a benchmark plan for the rsync-profile container, and risks. Recommends prototyping behind a feature flag with a benchmark gate before any wire-emitting code is touched. Distinct from #1023 (intra-file) and #1079 (receiver-side).
Summary
DirMergeOptionsinto merge directives so merge filters honor enforced include/exclude and CVS defaultsapply_merge_directiveto parse merge files through the options-aware helper with recursion protectionTesting