Wikis live in the repository !263

merged merged by cmc on 2026-09-05 06:19 UTC · krz/gitbay:wiki-in-repo into main

Discussion

cmc

A wiki was a companion bare repo at <name>.wiki.git with no row in the store, so it was invisible to backups, quotas, search and the activity feed, push was the only way to write to it, and .wiki was a permanently reserved repository name suffix.

Pages now live at .gitbay/wiki/ on the default branch, beside ci.yml and CODEOWNERS. One repository, one clone, one backup, one permission model. wiki list and wiki show keep their argv and JSON; only resolution moved.

Net deletion: the .wiki SSH route and runWikiGit, both wikiDir helpers, the name reservation, companion rename and delete, and the backup special-case. InitBare's empty-hooks-path branch went with them — runWikiGit was its only caller.

Access control is unchanged on every surface. Everything runWikiGit checked is what the parent repository's own runGit path already checks. Pushing to <name>.wiki.git now returns repository not found, matching a nonexistent repository exactly.

Two behaviour changes worth recording:

  • A write-scoped deploy key can now write wiki files, because they are ordinary repository files and the companion route used to refuse deploy scopes. That follows from one permission model rather than two.
  • wiki list on a repository with no wiki exits 0 with an empty page list where it previously exited 3. wiki show still exits 3.

.gitbay/ci.yml gains paths-ignore on test, vuln and sonar so a prose commit does not queue the full suite; build stays unconditional.

Operational note for deploy: with the .wiki name reservation gone, repo create <owner>/<name>.wiki maps to the same directory a leftover companion occupies, and repo create runs git init --bare over whatever is there, which reinitializes and keeps existing objects. The orphaned *.wiki.git directories must be removed in the same window as the deploy, not eventually. krz/gitbay.wiki is migrated by hand first; its history is bundled.

Design: docs/specs/2026-09-04-wiki-in-repo-design.md.

Closes #170