Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Binary size comparison: |
|
rustfmt is sad :) |
|
GNU testsuite comparison: |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
Review effort: Lite
|
Hi @sylvestre, I've addressed all the feedback:
Thank you for the thorough review! Please let me know if anything else needs adjusting. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
resolve_partreturns the raw spec when it doesn’t start with '+'. If the caller providesuser:… · Newresolve_partreturns the raw spec when it doesn’t start with '+'. If the caller providesuser:… · New With the new destination formatting logic, it would be valuable to add a case coveringuser:(or… · New
Review effort: Lite
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
6 open issues
resolve_partreturns the raw spec when it doesn’t start with '+'. If the caller providesuser:…resolve_partreturns the raw spec when it doesn’t start with '+'. If the caller providesuser:… This PR adds non-trivial parsing behavior (not splittingjohn.doeunless a group is expected).… · Newgroups_onlyinfluences the action string (prints “group”), but it doesn’t constrain the… · New Theformat!string mixes positional{}and captured identifiers ({action},{dest}). This… · New With the new destination formatting logic, it would be valuable to add a case coveringuser:(or…
Review effort: Lite (adaptive)
Merging this PR will not alter performance1 warning, 1 note
Comparing Footnotes
|
… in format_target_ownership Address two review comments from @sylvestre: - Extract a small resolve_part(spec, id) helper to eliminate four identical `if spec.starts_with('+') { id } else { spec }` blocks. - Handle '.' as a user/group separator in addition to ':' so that `chown -v +1000.+1000 ghost` correctly prints`1000:1000` instead of dropping the group. - Add a test case for the dot-separator form in test_chown_verbose_broken_symlink_plus_ids.
…t signature Address three review comments from @sylvestre: - Remove UTF-8 BOM that was inadvertently added to perms.rs and test_chown.rs. - Change resolve_part to take u32 instead of Option<u32> and use it as self.dest_uid.map(|id| resolve_part(u, id)).unwrap_or_default() so the call sites are cleaner (suggested at line 302). - Only attempt to split on '.' when dest_gid is set, so that dotted user names like 'john.doe' (a real user with no group) are not incorrectly split at the dot (bug reported at line 300). - Add a colon-separator test case (+UID:GID) alongside the dot-separator case in test_chown_verbose_broken_symlink_plus_ids.
Fix rustfmt formatting as requested by @sylvestre: reformat the action= conditional to fit on fewer lines per rustfmt style.
ec7e925 to
a12cfbb
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.


Fixes #16500.
Problem
When
chown -vencountered a broken symlink that cannot be dereferenced,traverse()inperms.rsechoedself.raw_ownerverbatim and hardcoded"failed to change ownership"even when only a group was specified:chown -v +1000 ghostprintedfailed to change ownership of 'ghost' to +1000(GNU prints1000).chown -v :+1000 ghostprintedfailed to change ownership of 'ghost' to :+1000(GNU printsfailed to change group of 'ghost' to 1000).Solution
format_target_ownership(&self) -> (&'static str, String)insrc/uucore/src/lib/features/perms.rsto format destination owner/group without a leading+when a numeric ID specification is used."group"when only a group is specified (or whengroups_onlyis set).:and.as user/group separators without breaking dotted usernames (john.doe).test_chown_verbose_broken_symlink_plus_idsintests/by-util/test_chown.rs.