pub fn encode_v2_capability_advertisement(
caps: &[impl AsRef<str>],
) -> Result<Vec<u8>, ProtocolError>Expand description
Encode a v2 capability advertisement.
gitprotocol-v2:
capability-advertisement = protocol-version capability-list flush-pkt,
protocol-version = PKT-LINE("version 2" LF),
capability = PKT-LINE(key[=value] LF).
version 2 is the protocol-version line, not a caller capability.
Each entry of caps is one capability line. delim-pkt and response-end-pkt
are not part of this advertisement; callers append those packets themselves.