zit 0.14.6 makes zit serve refuse a push or pull from a different
project, as Fossil does, and lets a new empty repository take the project
of the first push it receives.
This release is from trunk. Stores, caches and the wire are unchanged from 0.14.5; nothing is rebuilt on upgrade.
zit serve refuses another project
zit serve accepted a push, and answered a pull, from a repository with a
different project code, so two unrelated histories could be mixed in one
store. It now refuses as Fossil does, with error wrong project, before
it looks at anything else in the request, and stores and sends nothing. A
clone is unaffected: it takes the server's code.
A repository made by zit init can therefore no longer push into, or pull
from, another made by zit init. Clone one from the other, or see
--adopt-project below.
A clone now saves its origin's project code before the first artifact it receives, so a clone that was cut short still pulls from its origin and finishes. One cut before it received anything holds nothing of the origin and is refused; clone again.
The client names the way out. A refused push says "the peer refused: wrong
project (this repository and the peer's are different projects; clone the
peer to work on it)". A refused pull or sync says to run zit push first
if the peer is a new empty repository, and otherwise to clone it.
serve --adopt-project
zit serve --adopt-project lets an existing project be pushed into a
store just made with zit init. While the store is empty, the first push
that lands content makes the pusher's project code the store's own, in the
same commit as that content. From then on the store is strict, and a later
clone carries the adopted code.
- Empty means the store holds no artifact at all, which is what
zit initleaves. Any commit, push, pull or import that stores one ends it. - First contact must be
zit push. A pull is always judged against the store's current code, so azit sync, or the autosync of azit commit, before the first push is refused; the message says to push first. - A code that is not 40 or 64 lowercase hex digits is never adopted. A read-only server never adopts.
- The flag is off by default, because with it anyone who may write to the server can claim an empty store. It is meant for a server whose writers are checked in front of it, such as a forge.
A stock Fossil client can make the first push too, and a Fossil clone of the store afterwards carries the pusher's code.
Tests
Not user-facing, but they change what a contributor sees.
- The smoke, muscle-memory, benchmark and fuzz programs wrote their output from the start of the file they were given, so appending one to a log overwrote what earlier commands had written. They now write as streams.
- A server started by a test dies with the test process, however it ends, and a test that leaves one running fails.
- Allocation-failure tests refuse in-place resizes, so the number of allocations they walk no longer depends on the platform's heap.
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.