Repository navigation
Conversation
fe5ed6c to
c4dc7a7
Compare
22410bd to
183c419
Compare
|
clippy is sad on 7 jobs :) |
|
clippy is sad :), and a bunch of jobs are failing |
Validate every --block-size occurrence in config.rs and pick the last size mode option instead of scanning argv by hand.
183c419 to
f7b9531
Compare
Merging this PR will degrade performance by 3.46%3 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
ls --block-size=0 --siprinted the listing and exited 0, because--si(or-h) appearing after--block-sizemade clap drop the block-size value before it was validated. GNU validates the argument as it is parsed, regardless of option order:Validate every command-line
--block-sizevalue up front, so an invalid size is rejected even when a later-h/--sichanges the display format. The existing last-one-wins behaviour between--block-sizeand-h/--siis unchanged.Test:
tests/by-util/test_ls.rs::test_ls_invalid_block_size(new cases for--block-size=0 --siand--block-size=invalid --human-readable).Closes #16008