A shortcut for the git commands a barerepo already understands.
go build ./cmd/br
One binary, nothing outside the standard library. It needs git on your
PATH, and ssh-keygen for br auth.
| Command | What it runs |
|---|---|
br auth <name> [server] |
ssh-keygen -Y sign -n barerepo-auth, then prints a one-time sign in link |
br propose [remote] |
git push <remote> HEAD:refs/proposals/new |
br fetch <n> |
git fetch origin refs/proposals/<n>:prop-<n> |
br notes |
git fetch origin "refs/notes/*:refs/notes/*" |
br threads |
git for-each-ref refs/notes/threads/ |
br thread <n> |
git log --show-notes=threads/<n> |
br reply <n> -m <msg> |
git notes --ref=threads/<n> append, then a push |
Nothing here is required. Every command prints the git it runs before it runs it, so reading the output teaches the command that replaces it. You can delete this program and lose access to nothing.
The server is read from origin. An ssh remote in either spelling maps to
https on the same host, because the ssh port says nothing about the web
port. Pass the server yourself to override that.
Two people replying at once is ordinary, so br reply handles it. On a
rejected push it takes what the server holds, writes your reply after it,
and pushes again. A union merge is the obvious route and the wrong one: it
joins two notes with no record separator, which welds two comments into
one. Anything your copy held that the server has not seen is parked at
refs/notes/before-reply/threads/<n> rather than reset away.
The tests that drive a real server live behind a build tag, because they need all three checkouts side by side. Without the tag this repository builds and tests on its own and depends on nothing.
git clone https://barerepo.com/barerepo/server ../server
printf 'go 1.24\n\nuse (\n\t./cli\n\t./runner\n\t./server\n)\n' > ../go.work
go test -tags crossrepo ./...