Skip to content
zit Artifact [b8fd2e039c]
Login

Artifact [b8fd2e039c]

Artifact b8fd2e039c6315e5babd809fe637960d48bd570477e876aae145a25831e83b1c:


# zit 0.6.2

zit 0.6.2 makes incremental Git imports recoverable after an interruption,
gives automated callers a machine-readable result, adds an explicit way to
follow a renamed source default branch, and repairs cache integrity and
narrowed file reads.

This release is from trunk. Horizon clones and their protocol extensions
are not included.

## Interrupted incremental imports

An `import-git --into` that was killed while appending previously left the
store ahead of its import map, and every later refresh refused the
destination. An incremental import now stages only its new log tail and its
old and new maps in a private bundle, and makes that intent durable before
touching the live store. From then on it completes only by appending the
exact missing tail; foreign or damaged bytes are refused, never truncated.

```sh
zit import-git --recover DEST
```

finishes a prepared import without the Git source. Repeating it is harmless.
While an import is pending, ordinary writers, generation rewrites and new
readers refuse the store and name the recovery command. Readers that were
already open keep their original snapshot.

Back up the store's `.zit`, `.zit-import-map`, and any `.zit-import-pending`
or `.zit-import-completed` directory together, while quiescent or through a
consistent filesystem snapshot. Independent live copies are not a
consistent backup.

## Machine-readable import results

`import-git -F json` writes one versioned result on stdout; diagnostics stay
on stderr. `outcome` is one of `changed`, `unchanged`, `refused`,
`insufficient_history`, `busy`, `recovery_required`, `committed_uncertain`,
`recovered_changed` or `recovered_unchanged`. Alongside it are `reason`,
`changed` and `committed` (null when not established), `added_checkins`,
`durability`, and `retry` (`none`, `deepen`, `later` or `recover`).

A ref-only change, such as a tag added or deleted, reports `changed` with
zero added check-ins. Destination, map, settings and object-format checks
run before the shallow-history verdict, so a stale destination is never
reported as a reason to fetch more history. Only `retry: deepen` asks for a
deeper shallow source, and it does not prove the source's identity. Text
output and exit codes are unchanged.

## Following a renamed default branch

```sh
zit import-git SOURCE DEST --into --migrate-default-branch NEW \
  --expect-default-branch OLD --expect-imported-head HASH
```

rebinds the default that a destination was first imported with. NEW must be
the old Git tip or its first-parent continuation in the source as captured;
an unrelated branch or stale expectations are refused, and a shallow gap
reports insufficient history. Existing check-in IDs, abandoned history and
destination branch labels are preserved. Ordinary `--default-branch`
behaviour is unchanged, and nothing follows source HEAD automatically.

The importer now captures source refs and shallow cuts once, in private
temporary Git metadata, so proof and export always use the same selection
even if the caller's refs move during the run. Imports also no longer fail
on repositories with many refs.

## Cache integrity and narrowed reads

Persisted caches are checksummed again before use, including shun and user
records: a corrupted cache can no longer expose content the store still
shuns. Narrowed `cat` and `ls` reads no longer miss a file in a valid
manifest that contains a dropped reserved name. Cached long listings verify
content rather than trusting a size, and identical blobs within one listing
are classified once.

## Locking

An incomplete lock record, or a stale holder whose break cannot proceed, is
no longer reclaimed by age; it is reported as needing inspection rather than
as an ordinary busy store.

## Compatibility

The artifact and repository store formats are unchanged. Existing import
maps continue to work and are upgraded on the first changed incremental
import. Fossil's branch-resolution rules and the synchronization protocol
are unchanged.

## 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).