What a fork's held reader's fetch does with have and shallow
A fork shares its parent's object store. A reader of a fork who may not read the
parent (it became private) is held to what the fork's own refs reach
(src/git/own_refs.ts): the want lines of a fetch, over HTTP and over ssh.
The have and shallow lines are held the same way, because git would ACK a
have of an id the parent holds and die on a shallow that is a parent's tree
or file, and that tells the reader which ids the parent has.
- A
haveorshallowof an id the store holds but the fork's refs do not reach is dropped before git sees it, so git answers as for an id nothing holds: no ACK, no error. Dropping ahavecosts a bigger pack, nothing more. - Ids the fork's refs reach, and ids the store does not hold, pass unchanged.
- Later rounds count too: over ssh every chunk the client sends passes the same filter, in order, before git's input is closed.
- At most 64 held ids are checked per fetch; the rest are dropped.
- A malformed pkt-line from a held reader ends the fetch with the same sentence
as a refused
want(HTTP: the refusal body; ssh: stderr and the channel's git is killed).
Readers of the parent are never held and see none of this.