Skip to content

Align sparse writer with upstream semantics#2141

Merged
oferchen merged 1 commit into
masterfrom
map-and-log-parity-gaps-for-oc-rsync
Nov 13, 2025
Merged

Align sparse writer with upstream semantics#2141
oferchen merged 1 commit into
masterfrom
map-and-log-parity-gaps-for-oc-rsync

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • mirror upstream sparse handling by limiting hole creation to leading/trailing zero runs while keeping the single-seek invariant
  • add scalar/optimized helpers for trailing zero detection together with targeted tests
  • drop the unused memchr dependency from the engine crate and update the lockfile

Testing

  • attempted cargo test -p engine sparse_writer_accumulates_zero_runs_across_chunks (build pending in container)

Codex Task

@oferchen oferchen merged commit 1f683fe into master Nov 13, 2025
@oferchen oferchen deleted the map-and-log-parity-gaps-for-oc-rsync branch November 13, 2025 22:07
oferchen added a commit that referenced this pull request May 14, 2026
Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant