Repository navigation
Review round 3 - #33
Merged
Merged
Conversation
- Symlink cycles are detected as hashdeep does, by a link leading into a directory on its own path, rather than only walk roots and followed links which walked a cycle one level too far - --overwrite never replaces a directory or other non regular file, previously an empty directory was deleted and replaced with a database - Audits of an empty directory pass, previously the audit file of an empty directory could never be audited - An audit where any file could not be processed reports failed rather than passed, matching its exit code - Broken symlinks found while walking are skipped with a warning as hashdeep ignores them - Arguments which exist are used as is before being expanded as a glob, so files with [ ] * or ? in their name can be supplied - -vv is the same as --vv, as hashdeep users expect - BSD style sum lines padded by rhash are accepted - test-hashdeep.sh uses temporary directories rather than removing audit.txt from the working directory, and the examples script requires a target directory rather than writing 72,000 files to the current one Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolving paths against the audit file's directory meant a record such as ./a.txt in ../a.txt also resolved to the audit file itself, and was excluded as the audit file's own entry, so a modified a.txt was reported as new. A record is now only excluded when it refers to no other file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers what the review found missing from the README: hash names for --hash, how paths, wildcards, --input, symlinks and the ignore flags behave, each output format including json and hashonly, --mtime per format, exit codes, -v and -vv audit output, auditing subsets, copies, unreadable files, sum file hash guessing and path resolution, and SQLite defaults, temporary directory and rejected databases. Corrects the -X comparison with hashdeep and the description of when stdin is read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes from a third round of checking every README and help text claim against the code, and checking the README documents everything a user needs.
Bugs fixed
--overwritecould delete an empty directory. An empty directory reported size 0, passed the "SQLite database or empty" check, and was replaced with a database.--outputnow never replaces a directoryor other non regular file, for any format.
a link leading into a directory on its own path. The output now matches hashdeep for parent links, mutually linked directories, sibling links, links to
/, and./or absolute roots.[ ] * ?could not be hashed by name, because hashit expanded them as wildcards. Existing paths are now used as is before being expanded.-vvmeant-v. The flag library read it as-vtwice. It is now the same as--vv, as hashdeep users expect.rhash(MD4 (file) = …) are accepted.../a.txt, the record./a.txtalso resolved to the audit file through its directory and was dropped as its ownentry. A record is now only dropped when it refers to no other file.
test-hashdeep.shuses temporary directories, rather than deletingaudit.txtfrom the working directory.examples/performance_tests/create_folders_with_files.pyrequires a target directory, rather than writing around 72,000 files into the current one.README
Corrections:
@latestinstalls the last tagged release, which lacks newer features.-Xis a matching mode, not "display failed hashes".--input.New sections:
-r, wildcards,--input, symlinks, special files, hidden files, the ignore flags,--exclude-dirand--not-match.--mtimein each,--output,--stream-size,--no-stream, and debug output going to stderr.Additions to existing sections:
-vand-vvoutput linesb2sum, and which directory to run the audit fromhashit.dbis used when--outputis not givenSQLITE_TMPDIR--allow-moved--hashnames to use, and further hashdeep differences.Behaviour changes for release notes
--outputrefuses to replace a directory or other non regular file.-vvis the same as--vv.Testing
test-all.shandtest-hashdeep.shpass in full, andgo test -race ./processoris clean. New tests cover:--overwriteon a directory-vv