Skip to content

Add copy-devices support across client execution paths#2046

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-features-for-rsync-parity
Nov 7, 2025
Merged

Add copy-devices support across client execution paths#2046
oferchen merged 1 commit into
masterfrom
implement-missing-features-for-rsync-parity

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 7, 2025

Summary

  • thread the copy-devices flag through CLI parsing, client configuration, fallback invocation, and local copy execution so device nodes can be copied as regular files when requested
  • extend engine executors and options to honour copy-devices when traversing directories, symlink targets, and queued sources, and add tests for the new behaviour
  • document the new CLI support in the feature matrix

Testing

  • cargo test --workspace --all-features (fails: golden version output mismatch between upstream-captured fixture and current banner)

Codex Task

@oferchen oferchen merged commit ab2f10e into master Nov 7, 2025
@oferchen oferchen deleted the implement-missing-features-for-rsync-parity branch November 7, 2025 21:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

if is_device(&target_type) {
if !context.devices_enabled() {
context.record_skipped_non_regular(record_path.as_deref());
context.register_progress();
return Ok(());
}
copy_device(
context,
source,
destination,
&target_metadata,
metadata_options,
relative,
)?;
return Ok(());

P1 Badge Dereferenced device symlinks ignore --copy-devices

The new copy‑devices flag is respected when a device node is encountered directly in directory traversal or as an explicit source, but the unsafe‑symlink path still requires devices_enabled() and always calls copy_device. When a user runs oc-rsync --copy-devices --copy-unsafe-links link-to-device dest without --devices, the code at this branch treats the target as a special file, records a skipped non‑regular entry, and never copies the device’s contents as a regular file. This makes --copy-devices ineffective for symlinked devices and diverges from the behaviour for direct device paths. The branch should mirror the directory/sources logic by checking copy_devices_as_files_enabled() and delegating to copy_file when set before falling back to copy_device.

ℹ️ 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".

oferchen added a commit that referenced this pull request May 1, 2026
…3506)

Phase-1 audit only. Surveys the existing SSH transport surface in
crates/rsync_io/src/ssh and the --compress CLI plumbing, catalogs the
detection signals available at command-build time (argv -C / -o
Compression=yes, ssh -G HOST output, cipher-implied compression), and
proposes a phased plan for emitting a stderr warning when SSH and rsync
would double-compress the same byte stream. No code or Cargo.toml
changes; the recommended Phase 2 wiring point is build_ssh_connection
in crates/core/src/client/remote/ssh_transfer.rs.
oferchen added a commit that referenced this pull request May 5, 2026
…3506)

Phase-1 audit only. Surveys the existing SSH transport surface in
crates/rsync_io/src/ssh and the --compress CLI plumbing, catalogs the
detection signals available at command-build time (argv -C / -o
Compression=yes, ssh -G HOST output, cipher-implied compression), and
proposes a phased plan for emitting a stderr warning when SSH and rsync
would double-compress the same byte stream. No code or Cargo.toml
changes; the recommended Phase 2 wiring point is build_ssh_connection
in crates/core/src/client/remote/ssh_transfer.rs.
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