8ba716c3
instconf: take the origin and required-key helpers from ecore
Two copies of one function disagreed in this repo: hostFromOrigin returned an error for a malformed origin and web's hostOf answered "localhost", which is a guess that looks like an answer. Both are gone; the caller now names which half it means, and both wanted OriginAuthority — a port is part of a sealed-URL host, a JWT audience and the synthesized commit-author domain alike. The startup checks become one Require, so an operator filling in a fresh config.ini reads every missing key off one boot instead of one per restart. The hook's internal-origin read becomes InternalOrigin, which falls back to the external origin: an instance with only a public address is not misconfigured and used to be refused. And the git-description mirror is wired only when git.sr.ht has an API origin — web.Config already documented a nil Git as no mirroring, but nothing produced one, so an instance without git.sr.ht met config.GetAPI's panic on the first push.
Eugene Blikh <bigbes@gmail.com> — 2026-08-08 21:27:40 UTC
Commit 8ba716c343fd6c99a38fe208cb07268c08ac2f18 —
view raw patch
Parent(s):
95bedef8
| File | Status | + | − |
|---|---|---|---|
cmd/dolt-git-hook/main.go
|
M | +19 | -13 |
cmd/doltsrht/main.go
|
M | +38 | -32 |
cmd/doltsrht/main_test.go
|
M | +50 | -34 |