| 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 | |
| 36 | ## Open |
| 37 | |
| 38 | - [0011 — Deferred decisions](0011-deferred.md |