Skip to main content

Module protov0

Module protov0 

Source
Expand description

receive-pack (push) の protocol version 0。

push は protocol v2 に定義が無く、smart HTTP でも v0 の receive-pack を使う。

  • advertisement: GET $URL/info/refs?service=git-receive-pack
  • update: POST $URL/git-receive-pack (command 列 + flush + packfile)

sans-io 方針は fetch 側と同じで、本 module はバイト列の変換のみを行う。

Structs§

Command
ref の更新 command。
PushReport
report-status の解析結果。
ReceiveAdvertisement
receive-pack の advertisement。使用する capability だけを保持する。

Constants§

ZERO_OID
ref の新規作成・削除で使う全零の oid。

Functions§

parse_receive_advertisement
info/refs?service=git-receive-pack の response body を解析する。
parse_report_status
update request への response (report-status) を解析する。 side_band_64k を要求した場合、report は band 1 に包まれて届く。
push_request
update request の body を構築する。command 列 + flush の後に packfile が そのまま (pkt 化せずに) 続く。