feat(cli): align --info=help and --debug=help golden output (3.4.1 parity, C3)#4147
Merged
Merged
Conversation
…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
Merged
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output_item_help()(options.c:474-510) byte-for-byte for both--info=helpand--debug=help.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/--debughelp, and add theOptions added at each level of verbosity:summary block driven byinfo_verbosity[]/debug_verbosity[].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 -- --checkcargo update --workspace --offline--info=helpand--debug=helpstdout matchrsync --info=help/rsync --debug=helpfrom upstream 3.4.1 byte-for-byte (substituting binary name not required - format is identical).Closes #2177