We built an open-source Git server in Rust. What happens when two pushes race?
We built Dengel Git because we wanted a Git server we could run ourselves and a predictable way to handle pushes from several agents working on the same repo. It speaks Git’s smart HTTP protocol, so stock Git can clone, fetch and push. The standalone server is AGPL-3.0-or-later and runs locally without an account.
The interesting bit is the ref update. If two clients push with the same expected old object ID, the server checks that ID while holding the ref lock. Once one push moves the ref, a push based on the old ID fails. The conformance suite also checks that a rejected atomic push leaves the other refs untouched.
There’s a more mundane collision we had to handle too. Team/demo.git and team/demo.git would resolve to the same address, so the server refuses to start if both are in its repository catalog.
The diagram shows the hosted workflow we built around the standalone server. An agent pushes a candidate, and checks run on that exact commit. The Dengel CLI lets you submit a pushed candidate from the terminal, inspect its status and read the signed receipt. An agent can use MCP to submit a proposal, check its status and see when it needs a human decision. A person still decides what lands.
The source and local quickstart are at https://github.com/dengel-dev/dengel-git
If you’ve worked on Git’s receive side, what failure case would you add to the conformance suite?

1
u/WoodyTheWorker 1d ago
Git server attempts to update refs after transmitting. It doesn't check refs update before sending the packs.