Skip to content

refactor: decompose cli metadata.rs into focused submodules - #2840

Merged
oferchen merged 1 commit into
masterfrom
refactor/decompose-cli-metadata
Mar 21, 2026
Merged

oferchen merged 1 commit into
masterfrom
refactor/decompose-cli-metadata

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Splits the 827-line metadata.rs into a metadata/ directory with focused submodules: types.rs, compute.rs, mapping.rs, tests.rs
  • types.rs holds MetadataSettings and MetadataInputs data structures
  • compute.rs holds compute_metadata_settings() flag resolution logic with extracted parse_chmod_specs() helper
  • mapping.rs holds platform-specific user/group mapping parsers (Unix vs Windows strategy pattern)
  • mod.rs re-exports the public API so callers are unaffected
  • Cleaned up comments: replaced banner dividers with concise section headers, added module docs and rustdoc

Test plan

  • cargo fmt --all -- --check passes (verified locally)
  • CI fmt+clippy check passes
  • CI nextest passes on all platforms (Linux, macOS, Windows)
  • No public API changes - all existing callers compile without modification

@oferchen
oferchen merged commit 3c9e3fd into master Mar 21, 2026
17 of 32 checks passed
@oferchen
oferchen deleted the refactor/decompose-cli-metadata branch March 21, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant