Skip to content

feat: add AttrsFlags for selective time attribute application - #2442

Merged
oferchen merged 1 commit into
masterfrom
feat/attrs-skip-time-flags
Feb 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/attrs-skip-time-flags

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add AttrsFlags type with SKIP_MTIME, SKIP_ATIME, SKIP_CRTIME, REPORT, ACCURATE_TIME matching upstream rsync.h:192-196
  • Add SKIP_ALL_TIMES convenience combination
  • Add apply_metadata_with_attrs_flags() mirroring upstream set_file_attrs() (rsync.c:574-625)
  • Refactor apply_metadata_with_cached_stat() to delegate with empty flags (backward compatible)
  • Add apply_atime_only_from_entry() for SKIP_MTIME + preserve atime scenarios

Closes #291

Test plan

  • 15 unit tests for AttrsFlags constant values, combinations, and upstream scenarios
  • 8 integration tests for apply_metadata_with_attrs_flags() covering skip behaviors
  • All 362 metadata tests pass, 3531 engine tests pass, 935 transfer tests pass
  • cargo fmt and cargo clippy pass clean

Add ATTRS_SKIP_MTIME, ATTRS_SKIP_ATIME, ATTRS_SKIP_CRTIME,
ATTRS_REPORT, and ATTRS_ACCURATE_TIME flags matching upstream
rsync.h:192-196. These control which time attributes are skipped
when applying metadata, central to --modify-window and
omit_dir_times/omit_link_times behavior.

Add apply_metadata_with_attrs_flags() that respects these flags,
mirroring upstream set_file_attrs() in rsync.c:574-625.
@oferchen
oferchen merged commit 4b8f080 into master Feb 22, 2026
9 checks passed
@github-actions github-actions Bot added the enhancement New feature or request label Feb 22, 2026
@oferchen
oferchen deleted the feat/attrs-skip-time-flags branch February 22, 2026 12:32
oferchen added a commit that referenced this pull request May 1, 2026
…2442)

Add ATTRS_SKIP_MTIME, ATTRS_SKIP_ATIME, ATTRS_SKIP_CRTIME,
ATTRS_REPORT, and ATTRS_ACCURATE_TIME flags matching upstream
rsync.h:192-196. These control which time attributes are skipped
when applying metadata, central to --modify-window and
omit_dir_times/omit_link_times behavior.

Add apply_metadata_with_attrs_flags() that respects these flags,
mirroring upstream set_file_attrs() in rsync.c:574-625.
oferchen added a commit that referenced this pull request May 5, 2026
…2442)

Add ATTRS_SKIP_MTIME, ATTRS_SKIP_ATIME, ATTRS_SKIP_CRTIME,
ATTRS_REPORT, and ATTRS_ACCURATE_TIME flags matching upstream
rsync.h:192-196. These control which time attributes are skipped
when applying metadata, central to --modify-window and
omit_dir_times/omit_link_times behavior.

Add apply_metadata_with_attrs_flags() that respects these flags,
mirroring upstream set_file_attrs() in rsync.c:574-625.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a libfuzzer target driving `parse_bandwidth_argument` and
`parse_bandwidth_limit` with arbitrary UTF-8 input, covering the
RATE[:BURST] CLI string surface flagged by FCV-15. Seeds the corpus
with `100k`, `1.5m`, `0`, and `1g` to anchor the suffix and unlimited
branches.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a libfuzzer target driving `parse_bandwidth_argument` and
`parse_bandwidth_limit` with arbitrary UTF-8 input, covering the
RATE[:BURST] CLI string surface flagged by FCV-15. Seeds the corpus
with `100k`, `1.5m`, `0`, and `1g` to anchor the suffix and unlimited
branches.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a libfuzzer target driving `parse_bandwidth_argument` and
`parse_bandwidth_limit` with arbitrary UTF-8 input, covering the
RATE[:BURST] CLI string surface flagged by FCV-15. Seeds the corpus
with `100k`, `1.5m`, `0`, and `1g` to anchor the suffix and unlimited
branches.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds a libfuzzer target driving `parse_bandwidth_argument` and
`parse_bandwidth_limit` with arbitrary UTF-8 input, covering the
RATE[:BURST] CLI string surface flagged by FCV-15. Seeds the corpus
with `100k`, `1.5m`, `0`, and `1g` to anchor the suffix and unlimited
branches.
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