mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-14 16:01:57 +02:00
Use more constrained argument matching to improve forward compatibility and robustness. For example it's better that `cksum -a sha3` is _not_ equivalent to `cksum -a sha386`, so that a user specifying `-a sha3` on an older cksum would not be surprised. Also argmatch() is used when parsing tags from lines like: SHA3 (filename) = abcedf.... so it's more robust that older cksum instances to fail earlier in the parsing process, when parsing output from possible future cksum implementations that might support SHA3. * src/digest.c (algorithm_from_tag): Use argmatch_exact() to ensure we don't match abbreviated algorithms. (main): Likewise. * tests/misc/cksum-a.sh: Add a test case.