Skip to content
zit zit 0.3.13
Login

zit 0.3.13

zit 0.3.13 adds the write side of attachments. zit could read attachment artifacts — A cards fold, zit artifact describes them, sync carries them — but could not author one. Every other authoring path quarry uses is a zit verb; attachments now are too, so the artifact format is written in one place.

No artifact, tag namespace, sync message, or on-disk format changed. One new repository setting, attachment-size-limit, is carried in the config frame under a new key; older zit reads a repository that sets it without complaint and simply does not honour it.

zit attach add / rm / list (zit#186)

zit attach add  TARGET FILE [--name NAME] [--comment TEXT] [--mimetype TYPE]
                [--user NAME] [-R repo]        # FILE may be - for stdin
zit attach rm   TARGET NAME [--user NAME] [-R repo]
zit attach list [TARGET] [-R repo]

The cap. attachment-size-limit is fossil's setting, honoured the way fossil reads it — a byte count, checked before the blob is written, 0 meaning unlimited — with one difference: unset, zit's default is 1 MiB, not unlimited. A blob in the DAG travels to every clone for ever, and a default that lets a first-time user attach a 400 MB recording is the wrong default. add refuses over the limit naming the size and the limit; zit settings attachment-size-limit N raises it.

Interop. A zit-authored attachment pushed to a real fossil server crosslinks as a live attachment on its target with zit's blob as its source — fossil's attachment table says so, and the smoke suite now checks it on every run (scenario S15).

The quarry attachment stub (zit#187)

quarry never attaches file bytes to a hosted repository; it attaches a small text blob naming the bytes by SHA-256, size, type and name, so the A card stays a valid fossil artifact and the store stays small. zit now recognises that shape:

Compatibility

Qualification

zig build test, e2e (including the new attach test: add/list/replace/ rm, the size limit and its lifting, stdin, a wiki-name target, prefix stripping, and the stub), smoke (Fossil interop against a real fossil, now including S15), muscle (41 differential steps), git-import-e2e, git-export-e2e, and dst, plus the three-runner CI battery.