hn.today

Walgit: A Git server that is one binary in front of an object store

github.com74 points10 comments
Screenshot of Walgit: A Git server that is one binary in front of an object store

Walgit is a single-binary Git server that treats an S3- or GCS-compatible bucket as the authoritative repository store, eliminating databases, leaders, and durable local state. Point it at a bucket and you get smart HTTP fetch/push (v0/v2), bundle-URI clones served as static files, Git LFS with objects in the bucket, a React web UI and JSON API with an SDK, per-repository push policy, webhooks, and a server that scales to repositories larger than any single machine. Every running instance is a disposable cache; placement and roles control which hosts perform object work. Bundles are cut into calendar slots (weekly full, chained dailies/hourlies) to let fresh clones download a minimal chain, and read-through LFS from upstream is supported for imported repos.

Architecturally each repo is a write-ahead log (WAL) in the bucket: a small manifest.pb, immutable log entries, content-addressed pack files and sidefiles, checkpoints, bundles, leases, policy.json, and events. A push indexes and validates the pack, uploads pack+idx+log, then CASes the manifest with retry on conditional failures; concurrent pushes are group-committed. Reads do one conditional GET of the manifest and either serve cached state or apply new entries tailored to the request (refs, serve, full, objects), with pack downloads running asynchronously. Maintenance is a single loop that computes desired state (checkpoints, compaction, fsck/repair) and heals missing artifacts. Authentication supports none, static tokens, or OIDC; tooling and deployment are Rust-based with container, Nix, and web-build workflows.

Read on github.com10 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Other

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.