- Add const to RecordObjectCompare parameters
- Add static to crc32_table and table_computed in hash.c
- Rename NewRecordObject to RecordObjectNew
- Replace magic number 8192 with BUFFER_SIZE in utility.c
- Unify comment style to /* */ across all files
- Standardize _POSIX_C_SOURCE to 200809L
- Remove unreachable dead code in diff.c
Add fsnap diff <old> <new> that compares two snapshots and reports
added (A), deleted (D), metadata changed (M), permissions changed (P),
and symlink target changed (L) records.
Both snapshots are loaded into memory, sorted by path using qsort,
and merged with a two-pointer algorithm. Residual records after the
merge are emitted as A or D. Escape sequences in paths are decoded
on output.
Also add GetTime accessor, set errno on load_in_memory failures
for meaningful error messages, and fix unused-variable warnings.
Hash the followed target content with CRC-32 (hash.c/hash.h) and emit a FINGERPRINT field for non-directory records in create.c. Schema: TYPE|MODE|UID|GID|MTIME|SIZE|FINGERPRINT|TARGET per SPEC §17/§18.
Splits RecordObject, unpack, release, field and field_name out of list.c into types.c/types.h; declares field extern in the header with a single definition in types.c; adds src/types.c to SOURCES.
- create: write the snapshot to a temporary file and copy it into place
only after the walk succeeds; every failure now propagates through rc
instead of being reported as success, and the temporary is unlinked on
all exit paths
- create: skip snapshot files by matching the ".fsnap" suffix against the
basename, so entries below a directory whose name contains ".fsnap" are
no longer dropped from the snapshot
- walk: emit a record for directories as well as leaf files, honour the
return value of the operation callback, and free the path and close the
directory handle on every exit path
- utility: replace the fixed-size realpath buffer with realpath(NULL) and
add copy(), which reports read, write and close errors instead of
silently truncating the destination
- scan, create: set errno to EINVAL on invalid arguments so main can print
a meaningful message
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mbj1ZPUEhxqMYKsK7Y7jkt