feat(transfer): wire --info=NONREG default-on emission (3.4.1 parity)#4113
Merged
Conversation
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.
Merged
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.
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.
Closes #2161
Summary
--info=NONREGdefault-on emission throughCopyContext::record_skipped_non_regular, the single funnel for non-regular source skips (symlink fall-through, FIFO without--specials, device without--devices, recursive walkSkipNonRegular).generator.c:1687wording byte-for-byte:skipping non-regular file "<path>".info_log!(Nonreg, 1, ...)so--info=nononreg(level 0) suppresses it; defaultinfo.nonreg = 1fires at verbosity 0 matching upstream'sinfo_verbosity[0]table (options.c:240).docs/audits/info-flags-audit.md.Test plan
skipping_non_regular_emits_info_nonreg_noticeasserts byte-for-byte upstream wording viadrain_events().nononreg_suppresses_info_nonreg_noticeasserts the flag gate suppresses emission wheninfo.nonreg = 0.verbose_transfer_reports_skipped_specialsloosened to tolerate the new diagnostic-queue emission alongside the legacyemit_verbosestdout path.