df: treat env var with zero block size same as invalid#8932
Merged
cakebaker merged 2 commits intouutils:mainfrom Oct 17, 2025
Merged
df: treat env var with zero block size same as invalid#8932cakebaker merged 2 commits intouutils:mainfrom
cakebaker merged 2 commits intouutils:mainfrom
Conversation
36ce0e3 to
9368339
Compare
CodSpeed Performance ReportMerging #8932 will improve performances by 2.65%Comparing Summary
Benchmarks breakdown
Footnotes
|
|
GNU testsuite comparison: |
9368339 to
a9ec6a7
Compare
This was referenced Oct 17, 2025
|
GNU testsuite comparison: |
cakebaker
reviewed
Oct 17, 2025
Comment on lines
367
to
371
| if v != 0 { | ||
| Ok(v) | ||
| } else { | ||
| Err(ParseSizeError::ParseFailure("0".to_string())) | ||
| } |
Contributor
There was a problem hiding this comment.
A detail: I would use == instead of !=, it's slightly easier to read. Something like:
Suggested change
| if v != 0 { | |
| Ok(v) | |
| } else { | |
| Err(ParseSizeError::ParseFailure("0".to_string())) | |
| } | |
| if v == 0 { | |
| return Err(ParseSizeError::ParseFailure("0".to_string())); | |
| } | |
| Ok(v) |
a9ec6a7 to
6015c8f
Compare
|
GNU testsuite comparison: |
Contributor
|
Thanks! |
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.
Fixes #8918.
GNU
dfseems to treat passing0using an env var the same way as passing an invalid value, by using the default block size instead. SoDF_BLOCK_SIZE=0andDF_BLOCK_SIZE=invalidare functionally equivalent (including the cases involving the hierarchy of env vars).