| 1 | # Design decisions |
| 2 | |
| 3 | [Code standards](code-standards.md) |
| 4 | |
| 5 | One file per decision. Each states the decision, the reasoning, the alternatives |
| 6 | rejected, and the consequences — including the bad ones. |
| 7 | |
| 8 | ## Transport |
| 9 | |
| 10 | - [0001 — Git lives at the root namespace, REST lives under `/api |
| 11 | - [0019 — SSH is a second transport, not a second git](0019-ssh-is-a-second-transport-not-a-second-git.md |
| 12 | - [0002 — The transport layer takes streams, not `Request |
| 13 | - [0013 — The request body is captured before anything else can await](0013-raw-body-is-captured-first.md |
| 14 | - [0014 — A flush-only POST is a probe, not a malformed push](0014-the-pre-push-probe.md |
| 15 | - [0003 — `git/ |
| 16 | |
| 17 | ## Storage and durability |
| 18 | |
| 19 | - [0004 — Object storage is the source of truth, local disk is a cache](0004-object-storage-is-the-truth.md |
| 20 | - [0005 — One commit point per push, and it is a compare-and-swap](0005-single-commit-point.md |
| 21 | - [0006 — Entries carry no sequence number](0006-entries-carry-no-seq.md |
| 22 | - [0007 — Optimistic concurrency, never locks](0007-optimistic-concurrency.md |
| 23 | - [0008 — The log is a binary format](0008-binary-log-format.md |
| 24 | - [0009 — The index holds a ref snapshot, not a diff](0009-index-holds-a-snapshot.md |
| 25 | - [0010 — Orphaned entries are garbage, never corruption](0010-orphans-are-garbage.md |
| 26 | - [0012 — Materialization is forward-only replay](0012-forward-only-materialization.md |
| 27 | - [0015 — Nothing holds a packfile in memory](0015-nothing-holds-a-packfile.md |
| 28 | - [0020 — Deleting a repository is a tombstone, then a purge](0020-deletion-is-a-tombstone-then-a-purge.md |
| 29 | |
| 30 | ## Review |
| 31 | |
| 32 | - [0016 — A pull request spans two logs, and lends objects rather than copying them](0016-a-pull-request-spans-two-logs.md |
| 33 | - [0017 — Issues are rows, not branches](0017-issues-are-rows-not-branches.md |
| 34 | - [0018 — Timestamps are `timestamptz |
| 35 | - [0021 — Repository access is a role ladder, and an invitation grants nothing](0021-access-is-a-role-ladder.md |
| 36 | - [0022 — Users and organizations share one namespace](0022-owners-share-one-namespace.md |
| 37 | - [0023 — Organization access is a base permission, raised per repository](0023-organization-access-is-a-base-permission.md |
| 38 | - [0024 — Tags live in git, releases live in rows](0024-tags-live-in-git-releases-in-rows.md |
| 39 | - [0025 — Stored files are billed to the owning account, and the quota is configuration](0025-storage-is-billed-to-the-owning-account.md |
| 40 | - [0026 — A review is pinned to the head it read, and threads hang off its line comments](0026-a-review-is-pinned-to-the-head-it-read.md |
| 41 | - [0027 — Squash and rebase carry the head along](0027-squash-and-rebase-carry-the-head-along.md |
| 42 | - [0028 — Branch writes from the API are ref-only pushes](0028-branch-writes-are-ref-only-pushes.md |
| 43 | |
| 44 | ## Open |
| 45 | |
| 46 | - [0011 — Deferred decisions](0011-deferred.md |