Repository navigation
stat: add the 0 of %#a only when the digits do not start with one - #16393
Merged
Merged
Conversation
Contributor
|
clippy is sad on 4 jobs :) |
Contributor
Author
Contributor
Author
|
Merged main now that #16402 is in, so the clippy jobs should be green. |
sylvestre
reviewed
Nov 14, 2026
| use std::os::unix::fs::PermissionsExt; | ||
|
|
||
| let (at, mut ucmd) = at_and_ucmd!(); | ||
| at.touch("f"); |
Contributor
There was a problem hiding this comment.
could use at.set_mode() and pass both files in a single stat call, no?
Contributor
Author
There was a problem hiding this comment.
Yes, done: both files now go through set_mode and a single stat call.
|
GNU testsuite comparison: |
Contributor
|
Thanks for your PR |
hubot
pushed a commit
to coreutils/coreutils
that referenced
this pull request
Nov 15, 2026
* tests/stat/stat-fmt.sh: Check %#a with various precisions and widths, including for a mode of 0. uutils/coreutils#16393 Link: #463
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.
Closes #16392
%#aalways put a0in front of the octal digits, so%#.4aprinted00644and%#aprinted00for mode 0. Like printf's%#o, add it only when the digits, after the precision, do not already start with a0.