Update README where the fixes changed documented behaviour

diff now reports snapshot:line: field for a malformed record instead of
failing with a bare errno, and accepts an empty snapshot. The build
already uses -O2, so drop it from the roadmap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018KyCHPAxWzqa3vHKdXJkgx
This commit is contained in:
Fabio Scotto di Santolo
2026-08-26 15:13:46 +02:00
parent 1302d5a946
commit 0e890aecdc

View File

@@ -122,8 +122,9 @@ pathname:
| `L` | Symlink target is the only differing field after the other compared fields match | | `L` | Symlink target is the only differing field after the other compared fields match |
| `M` | Any other difference, including type, owner, size, time, or fingerprint | | `M` | Any other difference, including type, owner, size, time, or fingerprint |
`diff` does not print a line number or field name when an input snapshot is `diff` reports a malformed input the way `list` does, as
malformed; it fails with `EINVAL`. `snapshot:line: invalid <field_name>` or `snapshot:line: unparsable line`, and
returns `128` internally; `main` maps it to exit status `1`.
## Behaviour worth knowing ## Behaviour worth knowing
@@ -154,7 +155,9 @@ malformed; it fails with `EINVAL`.
rejects out-of-range values (`ERANGE`), negative `uid`/`gid`, and any leading rejects out-of-range values (`ERANGE`), negative `uid`/`gid`, and any leading
whitespace or `+` sign, rather than letting `strtoumax` wrap them. whitespace or `+` sign, rather than letting `strtoumax` wrap them.
- **An empty snapshot is valid.** `create` produces a zero-byte file for an - **An empty snapshot is valid.** `create` produces a zero-byte file for an
empty directory, and `list` accepts it silently with exit `0`. empty directory, `list` accepts it silently with exit `0`, and `diff` treats
it as carrying no records, so every entry on the other side is reported as
added or deleted.
## Known limitations ## Known limitations
@@ -202,8 +205,7 @@ Rough order of intent, no timeline:
filesystem, distinguishing `ENOENT`, `EACCES`, `ENOTDIR` and `ELOOP` filesystem, distinguishing `ENOENT`, `EACCES`, `ENOTDIR` and `ELOOP`
rather than collapsing them ([SPEC.md](SPEC.md) §18). rather than collapsing them ([SPEC.md](SPEC.md) §18).
- [ ] Honour `TMPDIR` instead of hardcoding `/tmp`. - [ ] Honour `TMPDIR` instead of hardcoding `/tmp`.
- [ ] Add a test suite and wire it into the `Makefile`; build with `-O2` so the - [ ] Add a test suite and wire it into the `Makefile`.
compiler's flow analysis is actually enabled.
- [ ] Add an `install` target. - [ ] Add an `install` target.
## License ## License