fix(targethasher): frame directory hashes for BUG-007 - #301
Conversation
|
|
d561d1d to
91e1319
Compare
sbalabanov
left a comment
There was a problem hiding this comment.
Update PR description to correctly represent changes on the last version vs base revision. Make accent on edge cases it aims to address. Shorten. Use simple language.
91e1319 to
fd67123
Compare
|
Updated the BUG-007 commit message and PR description in fd67123 to match the current two-file diff. The shorter text now highlights directory renames and structure, symlink target changes, deterministic streaming traversal, and the exclusion of checkout paths and mode bits. No code changed. [addressed by agent] |
fd67123 to
1c553e4
Compare
BUG-007 fixes directory hashes for edge cases that file contents alone miss. - Detect file, directory, and symlink renames, changed directory structure, empty directories, and symlink target changes. - Stream filepath.WalkDir in lexical order, so creation order does not matter and the whole tree is not buffered. - Hash local entry names and platform-neutral kinds with file contents or symlink targets. - Omit checkout paths and filesystem mode bits so hashes stay stable across machines. Tests cover rename, structure, symlinks, creation order, and mode independence.
1c553e4 to
0574208
Compare
Summary
BUG-007 fixes directory hashes for edge cases that file contents alone miss:
The implementation streams
filepath.WalkDirin lexical order and hashes each entry's local name, kind, and file contents or symlink target. It does not hash checkout paths or filesystem mode bits, so the result stays stable across machines.Tests
Added coverage for rename, directory structure, symlinks, creation order, and mode independence.