Skip to content

chown(ref): parse_uid flattened syntax#11351

Merged
cakebaker merged 2 commits intouutils:mainfrom
hlsxx:pr/parse-uid-flatten
Mar 18, 2026
Merged

chown(ref): parse_uid flattened syntax#11351
cakebaker merged 2 commits intouutils:mainfrom
hlsxx:pr/parse-uid-flatten

Conversation

@hlsxx
Copy link
Copy Markdown
Contributor

@hlsxx hlsxx commented Mar 16, 2026

chown: flatten parse_uid match arms and consolidate comments

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/unexpand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/expand/bounded-memory is now passing!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it's an improvement, I'm not a fan of the Err(_)s. Why not flatten it even more by getting rid of the matches and doing the steps sequentially with early returns?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, good point. I refactored it using early returns :)

@cakebaker cakebaker merged commit 91070e6 into uutils:main Mar 18, 2026
159 of 160 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks!

sylvestre pushed a commit to sylvestre/coreutils that referenced this pull request Mar 18, 2026
* chown(ref): parse_uid flattened syntax

* chown(ref): parse_uid early returns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants