Skip to content
zit Artifact [5327a2293d]
Login

Artifact [5327a2293d]

Artifact 5327a2293d7ff49d4328790b565038db2599e6cd2807e8ea53f7ffa8ed189b6b:


# zit 0.11.0

zit 0.11.0 makes the daemon fast at any store size, makes a sync with nothing
to do cheap, and reports forks after sync and pull.

This release is from trunk. Stores and the wire are unchanged from 0.10.1;
new sidecars beside the store are built on first use.

## Read first: sync and pull can exit 9

`zit sync` and `zit pull` now report a branch left with more than one open
leaf, and exit **9** when this exchange brought or made the fork. Until now
they exited 0. A caller that treats every non-zero exit as a failed sync
should treat 9 as a successful sync that left a merge to do. Any failure still
exits 1, even when a fork is present. A fork that was already there before the
exchange is reported but exits 0.

Each forked branch is printed on stderr as
`fork on BRANCH: N leaves (h12, …)`, newest leaf first. With `-F json`, sync
and pull print `schema_version`, `sent` (sync only), `received`, `rounds` and
`forks`: one entry per branch with its `leaves`, the `paths` that differ
between them, and `new` when this exchange made it. A clone reports an
origin's forks and exits 0.

## Faster

- **Sync with nothing to do.** On a 42,000-file store, a no-op `zit sync`
  took 476 ms of CPU and now takes about 7 ms; a no-op pull, 308 ms and now
  7 ms. Nothing is written when nothing arrived, the store is opened once for
  its settings, and resolved clusters and outstanding sub-manifest references
  are kept in sidecars checked against the log, so each run reads only what
  was appended. A sync that receives one commit took about 660 ms and now
  about 50.
- **Daemon commits stay flat as the store grows.** A one-file commit through
  `zit daemon` took 24 ms at 42,000 files and now takes about 4 ms (0.5 ms at
  50 files). The daemon folds its own commits into the view it holds and
  writes its caches lazily: every 64 commits, after a second idle, and at
  shutdown. A cache left behind by a crash is extended, never trusted past
  what it covers.
- **`log` for a path.** Finding each version now walks the tree to the file
  instead of flattening every node, and the size comes from the stored frame.
  Twenty rows through the daemon take 1 ms at 42,000 files, down from 94.
- **One-shot calls.** A process reads its checkout container once, and
  `annotate` opens the repository the fast way, so `info`, `cat` and
  `annotate` each cost about a millisecond less on a large store.

## New in the daemon

- `log` for a path, in pages, with the fields of `zit log -F json`.
- `annotate`, with or without `partial`.
- `diff` with a `path` returns that file's unified diff text.
- A refused request (an oversized header or trailer) is drained before the
  connection closes, so the client reads the error line instead of a broken
  pipe.

`zit help daemon` documents the shapes.

## Fixed

- A bare `zit pull` kept none of its options, `--user` included; it now keeps
  them.

## Compatibility

Stores, check-ins and the sync protocol are unchanged, and stock Fossil peers
are unaffected. Two new advisory sidecars appear in `.zit-cache`; they are
rebuilt if missing, stale or damaged. The only behaviour change callers can
see is sync and pull's exit 9 above.

## Qualification

The release manifest records native qualification against the exact tagged
source archive on macOS ARM64, Linux x86-64 and Linux ARM64, using the pinned
Zig 0.17.0 toolchain. Publication is gated on unit and end-to-end tests, Git
differentials, deterministic simulation, seeded fuzzing, and Fossil
interoperability checks on every distributed target.

For the basis of the conformance claim, see
[the 0.1.0 release notes](RELEASE-NOTES-0.1.0.md).