mbo/digest: --check mode for the digest CLI#233
Merged
Conversation
-c/--check verifies checksum files: OK/FAILED per listed file, coreutils-style warnings and exit codes; accepts '*' binary markers and uppercase hex, so sum files are interchangeable with sha256sum/shasum in both directions (verified live). Companions: --quiet, --status, --ignore_missing (fails if nothing was verified), --strict (malformed lines fail). bashtest covers roundtrip, stdin, coreutils format, corruption, quiet/status, missing/ignore-missing, and strict.
Fab-Cat
approved these changes
Jul 5, 2026
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.
Implements the verification half of the checksum workflow (the unscheduled idea from TODO):
-c/--check: arguments become checksum files (-= stdin); every listed file is re-digested with the selected-aalgorithm and reportedOK/FAILED/FAILED open or read, with coreutils-style stderr warnings and exit codes.shasum -a 256output checks clean underdigest -c, anddigestoutput checks clean undershasum -c -. Accepts*binary markers and uppercase hex.--quiet(no OK lines),--status(exit code only),--ignore_missing(skip unreadable listed files; still fails if no file was verified),--strict(improperly formatted lines fail).-a- hash length cannot disambiguate (32 bytes could be sha256, sha3-256, blake2b-256, or blake3).