Phase 2: implement --files-from/--from0/--filter/-F/-C #265

Closed
TapTap wants to merge 0 commits from feat/p2-files-from-filter into dev
Owner

Client-side file-list selection (--files-from + -0 NUL separator, allow-set gating in single + -m scan) and a filter-rule layer (--filter, -C/--cvs-exclude defaults, -F per-directory .rsync-filter) applied during scanning; independent layers with documented precedence; default behavior unchanged; no wire/protocol change. Unit + integration coverage (TestFilesFrom/TestFilters).

Client-side file-list selection (--files-from + -0 NUL separator, allow-set gating in single + -m scan) and a filter-rule layer (--filter, -C/--cvs-exclude defaults, -F per-directory .rsync-filter) applied during scanning; independent layers with documented precedence; default behavior unchanged; no wire/protocol change. Unit + integration coverage (TestFilesFrom/TestFilters).
TapTap added 1 commit 2026-09-06 13:44:11 +02:00
feat: add --files-from/-0, --filter, -C and -F filter layer
CI / lint (pull_request) Successful in 23s
CI / sanitizers (address) (pull_request) Successful in 40s
CI / sanitizers (undefined) (pull_request) Successful in 39s
CI / fuzz-build (pull_request) Successful in 17s
CI / coverage (pull_request) Successful in 34s
CI / build-and-test (pull_request) Successful in 1m28s
CI / valgrind (pull_request) Successful in 36s
f4c15a7b78
Implement the RSYNC_COMPAT Phase-2 filter/parser feature group:
- --files-from=FILE (repeatable) plus -0/--from0 NUL delimiters: parse the
  source file list relative to the source root into a shared read-only
  allow-set; the scanner transfers listed files and the whole subtree of
  listed directories and prunes everything else in single- and
  multithreaded mode. Absolute/'..' entries and missing files are hard
  CLI errors.
- --filter=RULE: rsync-style +/- rules (anchored '/', dir-only trailing '/',
  word include/exclude forms) evaluated first-match-wins with a default of
  include, as an independent layer from legacy --exclude/--include.
  Unsupported directives (merge/hide/... ) are rejected explicitly. -f stays
  sendfile.
- -C/--cvs-exclude: well-known rsync CVS default exclude set.
- -F: per-directory .rsync-filter files read during traversal and applied to
  the owning directory's subtree (single + parallel), never transferred.
- Delete manifest still derives from what was actually sent.

Client-only config fields; no wire/protocol change. Adds unit coverage
(CLI parse, allow-set and filter scanning single+parallel) and integration
tests (TestFilesFrom, TestFilters). RSYNC_COMPAT matrix rows updated:
5 rows move to Implemented (Summary 62/3/5/1/76 = 147).
Author
Owner

Merged into dev (HEAD 342dd15).

Merged to dev (342dd15; dev HEAD a196522, CI run #469 all green). Independent c-review found 1 blocker + warnings, all fixed: inner-first .rsync-filter precedence matching rsync (deeper files override shallower + base), listed-but-missing --files-from entries and empty lists now hard-error across single/-m/dry-run/list-only, source-root '/' scan regression fixed, unsupported filter syntax (modifiers, merge shorthands) rejected explicitly, NUL-mode CR/LF preserved, --no-from0/--no-cvs-exclude negatable. Closing as merged.

**Merged into dev** (HEAD 342dd15). Merged to dev (342dd15; dev HEAD a196522, CI run #469 all green). Independent c-review found 1 blocker + warnings, all fixed: inner-first .rsync-filter precedence matching rsync (deeper files override shallower + base), listed-but-missing --files-from entries and empty lists now hard-error across single/-m/dry-run/list-only, source-root '/' scan regression fixed, unsupported filter syntax (modifiers, merge shorthands) rejected explicitly, NUL-mode CR/LF preserved, --no-from0/--no-cvs-exclude negatable. Closing as merged.
TapTap closed this pull request 2026-09-06 14:31:55 +02:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#265