Skip to content

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Jan 6, 2026

GNU accepts md5sum --text --tag while rejecting --tag --text.
It is able to support on cksum with clap-based arg management. But difficult to support it on hashsum without adding --untagged due to clap's bug: clap-rs/clap#4520

This PR supports md5sum --tag --text by adding masked --untagged and make --text depends on it. We can add error something lile

`md5sum: --untagged is supported only on cksum

if needed.

@oech3 oech3 marked this pull request as draft January 6, 2026 23:03
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

GNU testsuite comparison:

GNU test failed: tests/cksum/b2sum. tests/cksum/b2sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum. tests/cksum/md5sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-newline. tests/cksum/md5sum-newline is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha1sum. tests/cksum/sha1sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha1sum-vec. tests/cksum/sha1sum-vec is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha224sum. tests/cksum/sha224sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha256sum. tests/cksum/sha256sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha384sum. tests/cksum/sha384sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha512sum. tests/cksum/sha512sum is passing on 'main'. Maybe you have to rebase?

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 6, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 3.05%

Comparing oech3:hashsum-text-tag (e635c78) with main (130f780)

Summary

⚡ 1 improved benchmark
✅ 138 untouched benchmarks
⏩ 37 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
tsort_input_parsing_heavy[5000] 73.1 ms 70.9 ms +3.05%

Footnotes

  1. 37 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@oech3 oech3 closed this Jan 6, 2026
@oech3 oech3 deleted the hashsum-text-tag branch January 6, 2026 23:20
@oech3
Copy link
Contributor Author

oech3 commented Jan 6, 2026

@RenjiSann Any idea about supporting md5sum --text --tag without regression?
(without clap)

@RenjiSann
Copy link
Collaborator

@RenjiSann Any idea about supporting md5sum --text --tag without regression? (without clap)

The previous code handled it like a charm, so it shouldn't be too much of a problem

@oech3
Copy link
Contributor Author

oech3 commented Jan 6, 2026

So we just forgot to add Rust native test and GNU is missing the test case?

@RenjiSann
Copy link
Collaborator

I guess I forgot it yes 😔

@oech3
Copy link
Contributor Author

oech3 commented Jan 7, 2026

If we have cksum doing it already, we can fix hashsum by cksum's codebase:
#10096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants