summaryrefslogtreecommitdiffstats
path: root/README
Commit message (Collapse)AuthorAgeFilesLines
* Remove protected-refs: a rule covers what it names, and nothing elsedev2026-11-131-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `set protected-refs` raised the price of a listed ref by one level: write needed force on main, force needed admin. It was a second, invisible list, and it was the one part of the model that could not be read off the rules. The question it was supposed to answer - "who can move main?" - stopped having an answer in the file: you had to hold both the rules and the protection list in your head and combine them, and the combination was where surprises lived. Giving someone force so they could rewrite their own branches quietly let them fast-forward main, because a fast-forward costs write, protection raised it to force, and there it was. Now a rule says what it says. An unscoped rule covers main; a rule that means to leave main alone names what it covers instead, and the refusal says "bob holds write on team, but not on refs/heads/main" rather than blaming a list nobody remembered. Excluding one person from one branch is a matter of what their lines name, which is the same mechanism as everything else here. The setting is refused by name rather than ignored. A policy that still carries one would otherwise mean "everyone with write can fast-forward main" while looking like it said the opposite, and the operator would learn that from a push rather than from the parser; so `set protected-refs` is now an error that says what to write instead, and the suite asserts both halves - that it is refused, and that cleaning it out makes the file valid again. What stays: refs outside refs/heads and refs/tags still need admin whatever a rule appears to grant about them. That one the policy genuinely cannot name in advance, because it is the part of the namespace no policy was written with in mind. `protect` goes with it, so the editing commands are grant and revoke. The example policy now names frank, whose two refs are main and the release tags, because that is the shape the file is now meant to be written in.
* README: what grant does with a file that is not there, and one that does not ↵dev2026-11-131-0/+4
| | | | parse
* README: what the policy says, what an update costs, and why three is not onedev2026-11-131-0/+223
Written as the questions get asked: what a rule means, what happens to a non-fast-forward, why "no policy" is a different exit status from "denied", which two facts belong to git and what is assumed when it cannot answer them, and why the editing commands refuse a read-only mount instead of writing somewhere surprising. The exit statuses are the interface, so they are stated once and up front: 0 allowed, 1 denied, 3 the host is broken, 64 you asked wrong. A refusal that a colleague reads is a support request; a refusal that a monitor reads is a page. The two must not share a status.