Skip to content

feat(transfer): wire --info=NONREG default-on emission (3.4.1 parity)#4113

Merged
oferchen merged 1 commit into
masterfrom
feat/info-nonreg-emission-2161
May 16, 2026
Merged

feat(transfer): wire --info=NONREG default-on emission (3.4.1 parity)#4113
oferchen merged 1 commit into
masterfrom
feat/info-nonreg-emission-2161

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Closes #2161

Summary

  • Wire upstream rsync 3.4.1's --info=NONREG default-on emission through CopyContext::record_skipped_non_regular, the single funnel for non-regular source skips (symlink fall-through, FIFO without --specials, device without --devices, recursive walk SkipNonRegular).
  • Mirror upstream generator.c:1687 wording byte-for-byte: skipping non-regular file "<path>".
  • Gate emission behind info_log!(Nonreg, 1, ...) so --info=nononreg (level 0) suppresses it; default info.nonreg = 1 fires at verbosity 0 matching upstream's info_verbosity[0] table (options.c:240).
  • Roll NONREG audit row from Stub to Match in docs/audits/info-flags-audit.md.

Test plan

  • New unit test skipping_non_regular_emits_info_nonreg_notice asserts byte-for-byte upstream wording via drain_events().
  • New unit test nononreg_suppresses_info_nonreg_notice asserts the flag gate suppresses emission when info.nonreg = 0.
  • Existing verbose_transfer_reports_skipped_specials loosened to tolerate the new diagnostic-queue emission alongside the legacy emit_verbose stdout path.
  • CI (fmt+clippy, nextest stable, Windows, macOS, Linux musl).

NONREG is part of upstream rsync's info_verbosity[0] table
(options.c:240), so the flag is enabled by default at level 1 even
without -v. Upstream emits "skipping non-regular file \"%s\"" from
generator.c:1687 under INFO_GTE(NONREG, 1) whenever a non-regular
source falls through the regular handlers.

oc-rsync had the flag wired through CLI parsing and the level table
(nonreg=1 at all -v levels) but no producer. The audit doc flagged
this as "Stub" with the note: "We do not emit a 'skipping
non-regular file' message anywhere; the gate exists in parsing but
no producer."

Funnel the emission through CopyContext::record_skipped_non_regular,
which is the single point all local-copy non-regular skip paths
converge on (symlink fall-through, FIFO without --specials, device
without --devices, recursive walk SkipNonRegular). The info_log!
macro gates formatting behind info_gte(Nonreg, 1) so the call is a
no-op when the flag is disabled via --info=nononreg.

The verbose listing path (emit_verbose) still renders the same
wording to stdout when -v is set, so user-facing output at -v is
unchanged. The new emission additionally feeds the diagnostic queue
at verbosity 0, matching upstream's default-on behaviour.

Two new tests assert byte-for-byte upstream wording and confirm the
emission is gated by info.nonreg. The existing
verbose_transfer_reports_skipped_specials test was loosened to
accept the notice on either stdout (legacy path) or stderr
(diagnostic queue) so it tolerates the additional emission point.
The audit doc rolls NONREG from Stub to Match.

Closes #2161.
@github-actions github-actions Bot added the enhancement New feature or request label May 16, 2026
@oferchen oferchen merged commit 72be959 into master May 16, 2026
45 checks passed
@oferchen oferchen deleted the feat/info-nonreg-emission-2161 branch May 16, 2026 00:35
@oferchen oferchen mentioned this pull request May 16, 2026
oferchen added a commit that referenced this pull request May 18, 2026
…#4113)

NONREG is part of upstream rsync's info_verbosity[0] table
(options.c:240), so the flag is enabled by default at level 1 even
without -v. Upstream emits "skipping non-regular file \"%s\"" from
generator.c:1687 under INFO_GTE(NONREG, 1) whenever a non-regular
source falls through the regular handlers.

oc-rsync had the flag wired through CLI parsing and the level table
(nonreg=1 at all -v levels) but no producer. The audit doc flagged
this as "Stub" with the note: "We do not emit a 'skipping
non-regular file' message anywhere; the gate exists in parsing but
no producer."

Funnel the emission through CopyContext::record_skipped_non_regular,
which is the single point all local-copy non-regular skip paths
converge on (symlink fall-through, FIFO without --specials, device
without --devices, recursive walk SkipNonRegular). The info_log!
macro gates formatting behind info_gte(Nonreg, 1) so the call is a
no-op when the flag is disabled via --info=nononreg.

The verbose listing path (emit_verbose) still renders the same
wording to stdout when -v is set, so user-facing output at -v is
unchanged. The new emission additionally feeds the diagnostic queue
at verbosity 0, matching upstream's default-on behaviour.

Two new tests assert byte-for-byte upstream wording and confirm the
emission is gated by info.nonreg. The existing
verbose_transfer_reports_skipped_specials test was loosened to
accept the notice on either stdout (legacy path) or stderr
(diagnostic queue) so it tolerates the additional emission point.
The audit doc rolls NONREG from Stub to Match.

Closes #2161.
oferchen added a commit that referenced this pull request May 18, 2026
…#4113)

NONREG is part of upstream rsync's info_verbosity[0] table
(options.c:240), so the flag is enabled by default at level 1 even
without -v. Upstream emits "skipping non-regular file \"%s\"" from
generator.c:1687 under INFO_GTE(NONREG, 1) whenever a non-regular
source falls through the regular handlers.

oc-rsync had the flag wired through CLI parsing and the level table
(nonreg=1 at all -v levels) but no producer. The audit doc flagged
this as "Stub" with the note: "We do not emit a 'skipping
non-regular file' message anywhere; the gate exists in parsing but
no producer."

Funnel the emission through CopyContext::record_skipped_non_regular,
which is the single point all local-copy non-regular skip paths
converge on (symlink fall-through, FIFO without --specials, device
without --devices, recursive walk SkipNonRegular). The info_log!
macro gates formatting behind info_gte(Nonreg, 1) so the call is a
no-op when the flag is disabled via --info=nononreg.

The verbose listing path (emit_verbose) still renders the same
wording to stdout when -v is set, so user-facing output at -v is
unchanged. The new emission additionally feeds the diagnostic queue
at verbosity 0, matching upstream's default-on behaviour.

Two new tests assert byte-for-byte upstream wording and confirm the
emission is gated by info.nonreg. The existing
verbose_transfer_reports_skipped_specials test was loosened to
accept the notice on either stdout (legacy path) or stderr
(diagnostic queue) so it tolerates the additional emission point.
The audit doc rolls NONREG from Stub to Match.

Closes #2161.
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