Skip to content
zit Artifact [bb786f01bf]
Login

Artifact [bb786f01bf]

Artifact bb786f01bfca90776d7977c64c1bab13a947262117f551101efc4008b0a61d8d:


# zit 0.3.7

zit 0.3.7 makes four read verbs cost what the image already paid for.
`grep` over a file's history takes a third of a second instead of twenty;
`timeline`, `info NAME`, and every read on a cache written by an older
build no longer replay work the image holds. A forge rendering a page from
hundreds of `zit info` calls sees each one at the process-start floor.

No artifact, tag namespace, or sync message changed.

## `grep` reads each version once

`zit grep PATTERN FILE` walked every check-in in the store and read the
file's manifest at each, then searched the same blob again and again: on
libspatialite that was 20,937 manifest reads and 19 seconds for 66
distinct versions of one file. It now uses the same touched set annotate
uses to skip check-ins whose record does not list the file, reads the
file's blob once per distinct content hash, and groups the report the way
`fossil grep` does — one row per version, credited to the oldest check-in
that introduced it, newest first. 272 reads and 0.35 s on the same file;
the version lists match fossil's byte for byte.

## `timeline` opens on the image

`timeline` opened the repository in full mode and replayed every crosslink
record for one row, though the image has carried adjacency since layout 2
and comment and login since layout 6. It reads the image now: 60 ms to
8 ms on a 22k check-in store. `-F full`, `-v`, and `-p` still read the
manifests they render, through the facade. Output is byte-identical across
every format, pinned by an e2e that renders warm and then from a fresh
derive.

## A stale image is rebuilt once

A cache whose image was absent or written at an older layout stayed that
way: only a miss stored the cache, and a hit replayed the record body on
every open — 58 ms per call on the same store, forever, after any layout
bump. A hit that has to replay now rewrites the image from the view it
just built, so the fallback is paid once.

## `info` renders Q cards from the state (step 1)

`info NAME` read and parsed the check-in's manifest for one purpose: the
`cherrypick:`/`backout:` provenance line almost no check-in has. The
crosslink record, the state, and the image now carry each check-in's Q
cards — sign and target, the two facts fossil's `cherrypick` table keeps —
and `info` reads them there. On libspatialite `info NAME` went from 16 ms
to 6 ms, level with `leaves`, with no manifest read. The multi-name form
of `info` (step 2) is still open on the issue.

## Compatibility

- Artifacts, tags, and the sync protocol are unchanged; Fossil RFC
  revision 00 remains the target.
- The cache format changed: the crosslink record is at format 4 and the
  image at layout 7. A cache written by 0.3.6 misses once and is rebuilt;
  nothing needs to be run by hand.
- No command, flag, or output changed. `grep`'s version order is now
  fossil's (oldest introducer, newest first); the set of versions is the
  same.

## Qualification

`zig build test`, `e2e`, `smoke` (Fossil interop against a real `fossil`),
`muscle` (41 differential steps), `git-import-e2e`, `git-export-e2e`, and
`dst`, plus the three-runner CI battery (macOS ARM64, Linux x86-64, Linux
ARM64). Timings were taken on the libspatialite corpus (24,018 artifacts)
with release builds, medians of 15 runs; `grep` output was diffed against
`fossil grep` on the same repository.