Repository navigation
fix: correct itemize time position T/t to match upstream - #2745
Merged
Merged
Conversation
The server-side format_iflags always emitted lowercase t at position 4 when ITEM_REPORT_TIME was set. Upstream rsync (log.c:708-717) distinguishes: - Non-symlinks: T when !preserve_mtimes (--times not set), t otherwise - Symlinks: T when !preserve_mtimes, !receiver_symlink_times, or ITEM_REPORT_TIMEFAIL (bit 2), t otherwise Add ItemizeContext to carry preserve_mtimes and receiver_symlink_times into the formatting function. Add ITEM_REPORT_TIMEFAIL constant (bit 2, shared with ITEM_REPORT_SIZE for non-symlinks per rsync.h:217). Update both generator and receiver callers to build context from config and compat flags.
oferchen
force-pushed
the
fix/itemize-changes-interop
branch
from
March 17, 2026 01:19
5cd4e0c to
b211dbf
Compare
oferchen
added a commit
that referenced
this pull request
May 1, 2026
* fix: correct itemize time position T/t distinction to match upstream The server-side format_iflags always emitted lowercase t at position 4 when ITEM_REPORT_TIME was set. Upstream rsync (log.c:708-717) distinguishes: - Non-symlinks: T when !preserve_mtimes (--times not set), t otherwise - Symlinks: T when !preserve_mtimes, !receiver_symlink_times, or ITEM_REPORT_TIMEFAIL (bit 2), t otherwise Add ItemizeContext to carry preserve_mtimes and receiver_symlink_times into the formatting function. Add ITEM_REPORT_TIMEFAIL constant (bit 2, shared with ITEM_REPORT_SIZE for non-symlinks per rsync.h:217). Update both generator and receiver callers to build context from config and compat flags. * formatting * fix: update itemize tests to match corrected formatting
oferchen
added a commit
that referenced
this pull request
May 5, 2026
* fix: correct itemize time position T/t distinction to match upstream The server-side format_iflags always emitted lowercase t at position 4 when ITEM_REPORT_TIME was set. Upstream rsync (log.c:708-717) distinguishes: - Non-symlinks: T when !preserve_mtimes (--times not set), t otherwise - Symlinks: T when !preserve_mtimes, !receiver_symlink_times, or ITEM_REPORT_TIMEFAIL (bit 2), t otherwise Add ItemizeContext to carry preserve_mtimes and receiver_symlink_times into the formatting function. Add ITEM_REPORT_TIMEFAIL constant (bit 2, shared with ITEM_REPORT_SIZE for non-symlinks per rsync.h:217). Update both generator and receiver callers to build context from config and compat flags. * formatting * fix: update itemize tests to match corrected formatting
This was referenced May 24, 2026
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
format_iflagsto correctly distinguishtvsTat position 4 of the 11-character itemize string, matching upstream rsynclog.c:708-717ItemizeContextstruct carryingpreserve_mtimesandreceiver_symlink_timesso the formatter has the option/capability context needed for the decisionITEM_REPORT_TIMEFAILconstant (bit 2, shared withITEM_REPORT_SIZEperrsync.h:217) for symlink time-set failure detectionDetails
Upstream rsync uses global variables to decide position 4:
log.c:716-717):Twhen!preserve_mtimes(user did not pass--times),totherwiselog.c:708-710):Twhen!preserve_mtimes || !receiver_symlink_times || ITEM_REPORT_TIMEFAIL,totherwiseThe oc-rsync implementation always emitted lowercase
t, ignoring these conditions. This caused incorrect output when--timeswas not used or when symlink timestamp preservation was unavailable.Both the generator (
protocol_io.rs) and receiver (mod.rs) callers now build anItemizeContextfromconfig.flags.timesandCompatibilityFlags::SYMLINK_TIMES.Test plan