Expand description
Pure protocol-v2 capability parsing and request-fragment building.
These helpers operate purely on the textual capability/feature lines exchanged during a
Git wire-protocol-v2 conversation (the lines between version 2 and the first flush, plus
the space-separated feature list inside a fetch= capability). They have no I/O, no
environment access, and no transport-backend coupling, so they are shared by every v2 client
transport (file://, git://, ssh, smart-HTTP) rather than duplicated per backend.
See Documentation/gitprotocol-v2.txt and serve.c / connect.c / fetch-pack.c in Git.
Functions§
- cap_
lines_ for_ command_ request - Build the capability lines a client echoes back when issuing a follow-up v2 command
(e.g.
command=bundle-uriorcommand=fetch). - fetch_
features - Collect the space-separated feature tokens advertised by the server’s v2
fetch=capability. - fetch_
supports_ feature - True when the server’s v2
fetch=capability lists<feature>. - fetch_
supports_ filter - True when the server’s v2
fetch=capability advertisesfilter(so the client may send afilter <spec>line). - fetch_
supports_ ref_ in_ want - True when the server’s v2
fetch=capability advertisesref-in-want(so the client may sendwant-ref <name>lines instead of resolving named refspecs to OIDs itself). - fetch_
supports_ sideband_ all - True when the server’s
fetch=capability advertisessideband-all. - server_
advertises_ bundle_ uri - True when the server’s v2 capability advertisement offers the
bundle-uricommand.