A push MUST send the branch of the store and no other reference, MUST never be forced, and a remote that has commits the branch lacks MUST end as a rejected value that says so and leaves the remote as it was.
Enforced (check): .github: cd commons/anyfs-git && bun run verify — suite/remote.test.ts
A fetch MUST read the remote's branch into a private reference and move the branch of the store only where that is a fast-forward (or the branch is not yet made); a branch that has diverged MUST be left as it is and said to have diverged, a branch the local store is ahead with MUST be said so, and a remote with no such branch MUST be said to be absent.
Enforced (check): .github: cd commons/anyfs-git && bun run verify — suite/remote.test.ts
The name of a remote MUST be refused where it starts with a dash, holds a control character or names a transport that runs a program, and only the transports for files, Git, SSH and the web MUST be allowed.
Enforced (check): .github: cd commons/anyfs-git && bun run verify — suite/remote.test.ts
Given a bare remote, When the branch is pushed, Then the remote has the branch at the tip, per FR-001.
Given a remote that another writer has moved, When the branch is pushed, Then it is rejected and the remote keeps the other writer's commit, per FR-001.
Given a remote ahead of the branch, When it is fetched, Then the branch is fast-forwarded, and a diverged branch is left and said so, per FR-002.
Given the name --upload-pack=x or ext::sh, When a push is asked for, Then it is refused before Git sees it, per FR-003.