Port #403: --min-filesize to skip small files - #16
Merged
Conversation
Ports markfasheh#403 by Andreas K. Huettel. Add -m/--min-filesize=N: regular files smaller than N bytes are skipped during scanning. Trees with many tiny files (which rarely dedupe usefully) scan much faster. Implemented by folding the existing empty-file skip into one threshold check in check_file(); min_filesize defaults to 1, so the default behaviour (skip only empty files) is unchanged. Rejects 0. Adds a man-page entry and an integration test. Co-authored-by: Andreas K. Huettel <[email protected]> Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Ports markfasheh/duperemove#403 by Andreas K. Huettel (@akhuettel).
Adds
-m/--min-filesize=N: regular files belowNbytes are skipped during scanning — a big speedup on trees with many tiny files (which rarely dedupe usefully). Folds the existing empty-file skip into one threshold incheck_file();min_filesizedefaults to 1, so the default behaviour (skip only empty files) is unchanged.--min-filesize=0is rejected. Man-page entry + integration test included./simplifyapplied: use the harnessmkrandhelper in the test, fix the man-page ordering (the new entry had split the-Bsection), and tighten the now-stalecheck_filedoc comment. 42 tests pass.🤖 Generated with Claude Code