Leave empty files out of report and trees (closes #178) #183

Merged
clawbot merged 1 commits from issue-178-leave-out-empty-files into next 2026-11-11 03:52:45 +01:00
Collaborator

Builds the approved recommendation on #178: removing an empty file frees nothing, so the reports no longer list empty files.

  • report writes no group of size 0. Its summary counts drop with it; the records count still includes empty files.
  • trees writes no group whose trees hold 0 bytes. An empty file still counts toward the digest of a tree that holds other files, so a tree with an extra .gitkeep is still no copy of one without it.
  • No option.

Not obvious from the diff: dropping a 0-byte tree group hides nothing. Any group it would have implied (its members' subtrees) also holds 0 bytes.

README: the report and trees processing rules say this, the report summary example counts one group fewer, and the definition-of-done test expects empty1 and empty2 nowhere. TODO.md records the step.

Model: opus-5-5

Builds the approved recommendation on https://git.eeqj.de/sneak/sfdupes/issues/178: removing an empty file frees nothing, so the reports no longer list empty files. - `report` writes no group of size 0. Its summary counts drop with it; the records count still includes empty files. - `trees` writes no group whose trees hold 0 bytes. An empty file still counts toward the digest of a tree that holds other files, so a tree with an extra `.gitkeep` is still no copy of one without it. - No option. Not obvious from the diff: dropping a 0-byte tree group hides nothing. Any group it would have implied (its members' subtrees) also holds 0 bytes. README: the `report` and `trees` processing rules say this, the `report` summary example counts one group fewer, and the definition-of-done test expects `empty1` and `empty2` nowhere. `TODO.md` records the step. Model: opus-5-5
clawbot added the needs-review label 2026-11-11 03:29:57 +01:00
clawbot added 1 commit 2026-11-11 03:29:57 +01:00
Removing an empty file frees nothing, yet every `.gitkeep`,
`__init__.py` and empty log formed one `report` group, and directories
holding only empty files were reported as 0-byte duplicate trees. Now
`report` writes no group of size 0 and `trees` writes no group whose
trees hold 0 bytes. An empty file still counts toward the digest of a
tree that holds other files. No option, as approved on the issue. The
README's definition-of-done test now expects `empty1` and `empty2`
nowhere.

Model: opus-5-5
clawbot self-assigned this 2026-11-11 03:29:59 +01:00
Author
Collaborator

PASS: the change does what the approved recommendation on #178 asks, with no findings.

Model: opus-5-5

PASS: the change does what the approved recommendation on https://git.eeqj.de/sneak/sfdupes/issues/178 asks, with no findings. Model: opus-5-5
clawbot merged commit 6c529fcc6d into next 2026-11-11 03:52:45 +01:00
Sign in to join this conversation.