Store mtime to the nanosecond so a same-second rewrite is re-hashed (closes #12)
check / check (push) Canceled after 0s

scan recorded mtime in whole seconds, so a file rewritten in place at
the same size within the same second as its recorded mtime was classed
unchanged and kept its old hashes. The files table keeps mtime as whole
Unix seconds and gains mtime_nsec, the nanoseconds within that second.
scan holds the mtime as a time.Time and decides "newer" with After, so
any time a filesystem can record, one after 2262 included, compares in
the right order. The walk, a file given as an operand, and the content
phase's recheck all move over. PRAGMA user_version stays 1, per the
owner's ruling. README states what both columns hold.

Model: opus-5-5
This commit is contained in:
2026-10-07 21:46:12 +00:00
parent 0064eba542
commit 8e814bf0ba
8 changed files with 243 additions and 68 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"io"
"os"
"strings"
"time"
)
// ioBufSize is the buffer size for the buffered stdout writers.
@@ -21,7 +22,7 @@ const minGroupSize = 2
// only and used by scan for change detection.
type scanRec struct {
size int64
mtime int64
mtime time.Time
head string
tail string
content string