Skip to content

feat(cli): align --info=help and --debug=help golden output (3.4.1 parity, C3)#4147

Merged
oferchen merged 1 commit into
masterfrom
feat/cli-info-debug-help-golden-2177
May 16, 2026
Merged

feat(cli): align --info=help and --debug=help golden output (3.4.1 parity, C3)#4147
oferchen merged 1 commit into
masterfrom
feat/cli-info-debug-help-golden-2177

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Reproduce upstream rsync 3.4.1's output_item_help() (options.c:474-510) byte-for-byte for both --info=help and --debug=help.
  • Restore the Use OPT or OPT1 ... OPT0 silences. preface, switch to upstream's "%-10s %s\n" per-flag layout, emit synthetic ALL/NONE/HELP rows quoting the sentinel's --info / --debug help, and add the Options added at each level of verbosity: summary block driven by info_verbosity[] / debug_verbosity[].
  • The internal no<flag> / -<flag> parser extension stays accepted but is no longer advertised in either help body, matching upstream's runtime surface.

Test plan

  • cargo fmt --all -- --check
  • cargo update --workspace --offline
  • CI: fmt+clippy, nextest (stable), Windows (stable), macOS (stable), Linux musl (stable)
  • Manual verification: oc-rsync --info=help and --debug=help stdout match rsync --info=help / rsync --debug=help from upstream 3.4.1 byte-for-byte (substituting binary name not required - format is identical).

Closes #2177

…rity, C3)

Reproduce upstream rsync 3.4.1's `output_item_help()` (options.c:474-510)
byte-for-byte for both `--info=help` and `--debug=help`:

- Restore the `Use OPT or OPT1 ... OPT0 silences.` preface line.
- Switch to upstream's `"%-10s %s\n"` per-flag table layout.
- Emit synthetic ALL/NONE/HELP rows quoting the sentinel's `--info` /
  `--debug` help (`Set all --info options (e.g. all4)`, etc).
- Add the `Options added at each level of verbosity:` summary block
  driven by `info_verbosity[]` / `debug_verbosity[]`, listing every
  populated verbosity row in `info_words[]` / `debug_words[]` order.

The internal `no<flag>` / `-<flag>` parser extension remains accepted
but is no longer advertised in either help body, mirroring upstream's
runtime surface.

Tests updated to lock the new structure: preface, per-verbosity summary
block, ALL/NONE/HELP rows, and the lowercase `all4` / `all0` example
tokens are now asserted on both `INFO_HELP_TEXT` and `DEBUG_HELP_TEXT`.
Existing byte-equality checks in `frontend/tests/info_debug.rs`
continue to compare oc-rsync's `--info=help` / `--debug=help` stdout
against these constants.

Closes #2177
@github-actions github-actions Bot added the enhancement New feature or request label May 16, 2026
@oferchen oferchen merged commit 803d372 into master May 16, 2026
33 of 45 checks passed
@oferchen oferchen deleted the feat/cli-info-debug-help-golden-2177 branch May 16, 2026 10:43
@oferchen oferchen mentioned this pull request May 16, 2026
oferchen added a commit that referenced this pull request May 18, 2026
…rity, C3) (#4147)

Reproduce upstream rsync 3.4.1's `output_item_help()` (options.c:474-510)
byte-for-byte for both `--info=help` and `--debug=help`:

- Restore the `Use OPT or OPT1 ... OPT0 silences.` preface line.
- Switch to upstream's `"%-10s %s\n"` per-flag table layout.
- Emit synthetic ALL/NONE/HELP rows quoting the sentinel's `--info` /
  `--debug` help (`Set all --info options (e.g. all4)`, etc).
- Add the `Options added at each level of verbosity:` summary block
  driven by `info_verbosity[]` / `debug_verbosity[]`, listing every
  populated verbosity row in `info_words[]` / `debug_words[]` order.

The internal `no<flag>` / `-<flag>` parser extension remains accepted
but is no longer advertised in either help body, mirroring upstream's
runtime surface.

Tests updated to lock the new structure: preface, per-verbosity summary
block, ALL/NONE/HELP rows, and the lowercase `all4` / `all0` example
tokens are now asserted on both `INFO_HELP_TEXT` and `DEBUG_HELP_TEXT`.
Existing byte-equality checks in `frontend/tests/info_debug.rs`
continue to compare oc-rsync's `--info=help` / `--debug=help` stdout
against these constants.

Closes #2177
oferchen added a commit that referenced this pull request May 18, 2026
…rity, C3) (#4147)

Reproduce upstream rsync 3.4.1's `output_item_help()` (options.c:474-510)
byte-for-byte for both `--info=help` and `--debug=help`:

- Restore the `Use OPT or OPT1 ... OPT0 silences.` preface line.
- Switch to upstream's `"%-10s %s\n"` per-flag table layout.
- Emit synthetic ALL/NONE/HELP rows quoting the sentinel's `--info` /
  `--debug` help (`Set all --info options (e.g. all4)`, etc).
- Add the `Options added at each level of verbosity:` summary block
  driven by `info_verbosity[]` / `debug_verbosity[]`, listing every
  populated verbosity row in `info_words[]` / `debug_words[]` order.

The internal `no<flag>` / `-<flag>` parser extension remains accepted
but is no longer advertised in either help body, mirroring upstream's
runtime surface.

Tests updated to lock the new structure: preface, per-verbosity summary
block, ALL/NONE/HELP rows, and the lowercase `all4` / `all0` example
tokens are now asserted on both `INFO_HELP_TEXT` and `DEBUG_HELP_TEXT`.
Existing byte-equality checks in `frontend/tests/info_debug.rs`
continue to compare oc-rsync's `--info=help` / `--debug=help` stdout
against these constants.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant