Open
Conversation
added 4 commits
March 1, 2026 22:37
fix: bumped up tempfile to "3.26.0" The variables for --bytes, --ignore-initial and line count where size 'usize', thus limiting the readable bytes on 32-bit systems. GNU cmp is compiled with LFS (Large File Support) and allows i64 values. This is now all u64, which works also on 32-bit systems with Rust. There is no reason to implement a 32-bit barrier for 32 bit machines. Additionally the --bytes limit can be set to 'u128' using the feature "cmp_bytes_limit_128_bit". The performance impact would be negligible, as there only few calculations each time a full block is read from the file.
This was referenced Mar 3, 2026
also add fn executable to DiffUtility
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #187 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is now a good option parser and has basic sdiff compare functionality. This is a good base for further development.
Author
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.
This is a first version of sdiff.
It implements the a new, fully working parser for the arg options, which also can easily be implemented for the other utils.
While it does not implement any functionality to compare the files, the parser is finished (pending bugs). This allows any developer to start working on the compare functionality with the prefilled Param struct having the options set.
The 'sdiff' seems to work largely identical to 'diff', with a different layout in the output. Code sharing should be possible.
The parser is written generically so it can be used in all diffutils tools. I already have a version for cmp as well.
After discarding clap as tool, as the requirements are very individual and would require extensive tweaking of the clap functionality.
There are a number of cases where the current parser does not yield the same results as GNU cmp, for instance 'cmp file_1 file_2 -bln50KiB'.
Since 'sdiff' does not exist yet, this is pure additional code. It also contains a help and version text, which needs to be finalized after discussion so no copyright infringement is taking place. I already reformulated some of the text.
I originally wanted to implement 'clap', but after some investigation I found the requirements of diffutils highly individual and it would require extensive tweaking of the clap functionality.
Relates to #16 and #97.