-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
cksum: Refactor cksum for incoming merge with hashsum, Fix behavior for --text and --untagged
#9024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
76ed8a6 to
f43d027
Compare
|
GNU testsuite comparison: |
f43d027 to
a96b7b5
Compare
|
GNU testsuite comparison: |
| InvalidLength, | ||
| #[error("--length is only supported with --algorithm=blake2b")] | ||
| LengthOnlyForBlake2b, | ||
| #[error("the --binary and --text options are meaningless when verifying checksums")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side note: it should be translated too
i missed it when i used translate!()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in this pr is fine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I plan to do it after getting rid of hashsum
|
GNU testsuite comparison: |
|
please fix |
71f97cd to
501bf0f
Compare
…hsum/cksum merge refactor
501bf0f to
a4f4542
Compare
|
GNU testsuite comparison: |
This PR fixes a behavior difference when handling
--text.Additionally, it brings a consequential refactor to the
cksumfunction, which is the main "read/checksum/print" loop.I introduced an
OutputFormattype to properly separate all printing strategies, because the previous representation didn't make sense: we had anOutputFormatenum that mixedRawandBase64/Hexadecimalwhen Raw if actually an alternative to printing a "tagged" or "untagged" line.This notably allowed me to remove the
#[allow(clippy::cognitive_complexity)]from the function which is good :)