Under the hood
Reads and writes
Section titled “Reads and writes”Reads go through libgit2: a revwalk beats parsing git log. Writes, and
anything that talks to a remote, go through the git binary, so they
behave exactly as on the command line — credential helpers, the SSH agent,
hooks and GPG signing all work as they already do.
A command that talks to a remote runs on another thread, so a slow fetch never freezes the window.
The interface
Section titled “The interface”The UI is dvui on SDL3, set in Inter
and JetBrains Mono. Zit draws its own window frame: the tab strip takes the
title bar’s place. On Linux it asks SDL for its GPU renderer, then Vulkan, then
OpenGL. The dark and light palettes are authored in src/theme/ and compiled
in.
zig build # needs Zig 0.17.0; libgit2 is built from sourcezig build run -- /path/to/repozig build dist # release executables in zig-out/dist/| Option | Does |
|---|---|
-Doptimize=debug |
A debug build: stack traces, leak checks |
-Dtrace |
Keep the symbols and the unwind tables, for a readable stack trace |
-Dsystem-libgit2=true |
Link the machine’s libgit2, for a quicker local build |
zig build dist cross-compiles from any machine with GNU tar and rm on the
PATH.
SDL_VIDEODRIVER=dummy zig build testSDL_VIDEODRIVER=dummy zig build test -Dtest-filter="part of a test name"The dummy video driver lets the interface tests render a frame without a
display. Most of the suite drives the real git binary in throwaway
repositories.
The whole story — memory, the watcher, the tab strip, the graph — is in docs/ARCHITECTURE.md.