Selection/output: -x drops mount-point dir; --include/--exclude ordering and inline = forms #291

Closed
opened 2026-09-15 19:33:34 +02:00 by TapTap · 1 comment
Owner

Audit findings.

  • -x/--one-file-system drops the cross-device mount-point directory entirely; rsync emits the directory entry (empty) and skips its contents. RSYNC_COMPAT.md claims it "matches rsync" — it does not.
  • --include/--exclude are not a single ordered first-match list: excludes run first, then any include list acts as a mandatory whitelist, so the common --include='*.txt' --exclude='*' idiom fails and --include alone excludes everything else. Fix: compile include/exclude in command-line order into the same ordered rule list used by --filter.
  • Missing inline = forms: --exclude=, --include=, --exclude-from=, --include-from=, --log-file= are only accepted as separate arguments. rsync accepts both.
  • --filter doc note says -f is not reassigned, but -f IS bound to --filter and advertised in help (stale note).

Add tests for include-order and mount-point dir.

Audit findings. - `-x/--one-file-system` drops the cross-device mount-point directory entirely; rsync emits the directory entry (empty) and skips its contents. RSYNC_COMPAT.md claims it "matches rsync" — it does not. - `--include`/`--exclude` are not a single ordered first-match list: excludes run first, then any include list acts as a mandatory whitelist, so the common `--include='*.txt' --exclude='*'` idiom fails and `--include` alone excludes everything else. Fix: compile include/exclude in command-line order into the same ordered rule list used by `--filter`. - Missing inline `=` forms: `--exclude=`, `--include=`, `--exclude-from=`, `--include-from=`, `--log-file=` are only accepted as separate arguments. rsync accepts both. - `--filter` doc note says `-f` is not reassigned, but `-f` IS bound to `--filter` and advertised in help (stale note). Add tests for include-order and mount-point dir.
TapTap added the needs-triage label 2026-09-15 19:33:34 +02:00
Author
Owner

Fixed. -x emits the mount-point directory entry (empty) and skips its contents (plain -x), while -xx drops it entirely; --include/--exclude are compiled in command-line order into the same ordered first-match rule list as --filter; inline = forms (--exclude=, --include=, --exclude-from=, --include-from=, --log-file=) are accepted. Stale -f/sendfile note removed. Closing as completed.

Fixed. `-x` emits the mount-point directory entry (empty) and skips its contents (plain `-x`), while `-xx` drops it entirely; `--include`/`--exclude` are compiled in command-line order into the same ordered first-match rule list as `--filter`; inline `=` forms (`--exclude=`, `--include=`, `--exclude-from=`, `--include-from=`, `--log-file=`) are accepted. Stale `-f`/sendfile note removed. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#291