Record each file's size on disk and print it in trees (closes #147) #149

Merged
clawbot merged 1 commits from issue-147-trees-disk-size into next 2026-10-27 19:56:50 +01:00
1 Commits
Author SHA1 Message Date
sneak 4ae7274bc0 Record each file's size on disk and print it in trees (closes #147)
check / check (push) Waiting to run
The files table gets a disk_size column: the file's allocated blocks,
st_blocks × 512, from the lstat the walk already does. scan writes it
with every record it writes. When a rescan finds a file with its size
and mtime unchanged but a different disk_size, it updates disk_size
alone, without reading the file. trees adds disk_size up per directory
and prints it as a column after size. On a compressed or sparse file it
is less than size, so two copies of one tree can differ; each row shows
the dupe copy's.

Judgement calls: a row's disk_size is the dupe copy's, not the first's.
A file whose record gets only a new disk_size counts as unchanged.

Model: opus-5-5
2026-10-27 18:41:24 +00:00