Skip to content

Add support for --no-msgs2stderr toggle#2147

Merged
oferchen merged 1 commit into
masterfrom
implement-behavioral-parity-with-rsync-3.4.1
Nov 14, 2025
Merged

Add support for --no-msgs2stderr toggle#2147
oferchen merged 1 commit into
masterfrom
implement-behavioral-parity-with-rsync-3.4.1

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • add the --no-msgs2stderr flag to the CLI command builder, help text, and defaults
  • parse the new negated flag via a tri-state toggle and carry it through workflow, fallback planning, and remote fallback arguments
  • update docs and tests so --no-msgs2stderr is covered and documented as implemented

Testing

  • cargo test -p cli parse_args_recognises_msgs2stderr

Codex Task

@oferchen oferchen merged commit 86ca80d into master Nov 14, 2025
@oferchen oferchen deleted the implement-behavioral-parity-with-rsync-3.4.1 branch November 14, 2025 12:02
oferchen added a commit that referenced this pull request May 14, 2026
Upstream rsync (options.c:2382) rejects the combination
`--append --whole-file` with the message
`--append cannot be used with --whole-file` and exits with
RERR_SYNTAX (1). oc-rsync was silently accepting both flags
together.

Add the conflict check to both validation layers that gate
config construction:
- `ClientConfigBuilder::validate` (core) - the primary path
  used by the CLI; surfaces a `ConfigConflict` whose `Display`
  matches upstream wording.
- `LocalCopyOptionsBuilder::validate` (engine) - keeps the
  engine-level builder in sync so programmatic embedders also
  reject the combination.

Only an explicit `--whole-file` (`Some(true)`) conflicts; the
default (`None`) and `--no-whole-file` (`Some(false)`) remain
accepted so existing call sites that set the tri-state from
auto-detection are unaffected.

Tests cover the engine builder, the core config builder
(including the exact upstream error string), and an end-to-end
CLI integration test that drives `cli::run` and asserts the
RERR_SYNTAX exit code plus the diagnostic mentions both flags.

Refs: #2145, #2146, #2147
oferchen added a commit that referenced this pull request May 18, 2026
Upstream rsync (options.c:2382) rejects the combination
`--append --whole-file` with the message
`--append cannot be used with --whole-file` and exits with
RERR_SYNTAX (1). oc-rsync was silently accepting both flags
together.

Add the conflict check to both validation layers that gate
config construction:
- `ClientConfigBuilder::validate` (core) - the primary path
  used by the CLI; surfaces a `ConfigConflict` whose `Display`
  matches upstream wording.
- `LocalCopyOptionsBuilder::validate` (engine) - keeps the
  engine-level builder in sync so programmatic embedders also
  reject the combination.

Only an explicit `--whole-file` (`Some(true)`) conflicts; the
default (`None`) and `--no-whole-file` (`Some(false)`) remain
accepted so existing call sites that set the tri-state from
auto-detection are unaffected.

Tests cover the engine builder, the core config builder
(including the exact upstream error string), and an end-to-end
CLI integration test that drives `cli::run` and asserts the
RERR_SYNTAX exit code plus the diagnostic mentions both flags.

Refs: #2145, #2146, #2147
oferchen added a commit that referenced this pull request May 18, 2026
Upstream rsync (options.c:2382) rejects the combination
`--append --whole-file` with the message
`--append cannot be used with --whole-file` and exits with
RERR_SYNTAX (1). oc-rsync was silently accepting both flags
together.

Add the conflict check to both validation layers that gate
config construction:
- `ClientConfigBuilder::validate` (core) - the primary path
  used by the CLI; surfaces a `ConfigConflict` whose `Display`
  matches upstream wording.
- `LocalCopyOptionsBuilder::validate` (engine) - keeps the
  engine-level builder in sync so programmatic embedders also
  reject the combination.

Only an explicit `--whole-file` (`Some(true)`) conflicts; the
default (`None`) and `--no-whole-file` (`Some(false)`) remain
accepted so existing call sites that set the tri-state from
auto-detection are unaffected.

Tests cover the engine builder, the core config builder
(including the exact upstream error string), and an end-to-end
CLI integration test that drives `cli::run` and asserts the
RERR_SYNTAX exit code plus the diagnostic mentions both flags.

Refs: #2145, #2146, #2147
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