The total is 3500 bytes. Removing every dupe path (B, B/x, C/x) frees 2500 bytes: B/x lies inside B, and its 1000 bytes are counted in both rows.
On the acceptance tree of about 4000 files the total read 7.5 MiB, where removing every dupe path frees 5.7 MiB.
Why it matters
The total is the number a user reads to decide whether a cleanup is worth doing. It is too high whenever a subtree has a copy outside two otherwise identical parents, which is common in backup trees.
What should happen
The total is what removing every dupe path in the report would free, by the recorded sizes: each recorded file at or below a dupe path is counted once.
The rows stay as they are.
README.md ("Trees output format") defines the total as "the sum of size over all rows". The code follows that sentence, so the sentence changes with the code.
Model: fable-5-2
Defect, found in the acceptance test (https://git.eeqj.de/sneak/sfdupes/issues/164) on `next` at `202f083`.
## Steps
```sh
make build
d=$(mktemp -d /var/tmp/sfdupes.XXXXXX)
export SFDUPES_DATABASE="$(mktemp -d /var/tmp/sfdupes.XXXXXX)/db.sqlite"
mkdir -p "$d/A/x" "$d/A/y" "$d/B/x" "$d/B/y" "$d/C/x"
dd if=/dev/urandom of="$d/A/x/f" bs=1000 count=1 status=none
dd if=/dev/urandom of="$d/A/y/g" bs=500 count=1 status=none
cp "$d/A/x/f" "$d/B/x/f"
cp "$d/A/y/g" "$d/B/y/g"
cp "$d/A/x/f" "$d/C/x/f"
./sfdupes scan "$d"
./sfdupes trees
```
## What happened
```
first dupe files size disk_size
$d/A $d/B 2 1500 1024
$d/A/x $d/B/x 1 1000 512
$d/A/x $d/C/x 1 1000 512
trees: 5 records read, 2 duplicate tree groups, 3 dupe trees, 3.4 KiB reclaimable
```
The total is 3500 bytes. Removing every `dupe` path (`B`, `B/x`, `C/x`) frees 2500 bytes: `B/x` lies inside `B`, and its 1000 bytes are counted in both rows.
On the acceptance tree of about 4000 files the total read 7.5 MiB, where removing every `dupe` path frees 5.7 MiB.
## Why it matters
The total is the number a user reads to decide whether a cleanup is worth doing. It is too high whenever a subtree has a copy outside two otherwise identical parents, which is common in backup trees.
## What should happen
- The total is what removing every `dupe` path in the report would free, by the recorded sizes: each recorded file at or below a `dupe` path is counted once.
- The rows stay as they are.
- `README.md` ("Trees output format") defines the total as "the sum of `size` over all rows". The code follows that sentence, so the sentence changes with the code.
Model: fable-5-2
sneak (11 November, about 02:25 UTC): a bug; fix it. The reclaimable total counts each duplicate tree once, never again when it lies inside another reported tree; a test covers a nested pair.
Model: opus-5-5
sneak (11 November, about 02:25 UTC): a bug; fix it. The reclaimable total counts each duplicate tree once, never again when it lies inside another reported tree; a test covers a nested pair.
Model: opus-5-5
Fixed in #188: the reclaimable total skips a dupe tree that lies inside another dupe tree. The rows are unchanged, and the README defines the total to match. The steps above now report 2.4 KiB (2500 bytes).
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/sfdupes/pulls/188: the reclaimable total skips a dupe tree that lies inside another dupe tree. The rows are unchanged, and the README defines the total to match. The steps above now report 2.4 KiB (2500 bytes).
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Defect, found in the acceptance test (#164) on
nextat202f083.Steps
What happened
The total is 3500 bytes. Removing every
dupepath (B,B/x,C/x) frees 2500 bytes:B/xlies insideB, and its 1000 bytes are counted in both rows.On the acceptance tree of about 4000 files the total read 7.5 MiB, where removing every
dupepath frees 5.7 MiB.Why it matters
The total is the number a user reads to decide whether a cleanup is worth doing. It is too high whenever a subtree has a copy outside two otherwise identical parents, which is common in backup trees.
What should happen
dupepath in the report would free, by the recorded sizes: each recorded file at or below adupepath is counted once.README.md("Trees output format") defines the total as "the sum ofsizeover all rows". The code follows that sentence, so the sentence changes with the code.Model: fable-5-2
yes, this is a bug, fix it
sneak (11 November, about 02:25 UTC): a bug; fix it. The reclaimable total counts each duplicate tree once, never again when it lies inside another reported tree; a test covers a nested pair.
Model: opus-5-5
Fixed in #188: the reclaimable total skips a dupe tree that lies inside another dupe tree. The rows are unchanged, and the README defines the total to match. The steps above now report 2.4 KiB (2500 bytes).
Model: opus-5-5