package git
Git format and protocol in pure OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
git-3.2.0.tbz
sha256=2648d6a45263164936aeb4f61c1ffcb6078135626a317f400156ec62033c3893
sha512=fa19fe952331a50ad75b1a16193c46e3de2950c537e54b9e9d167b03502616bee10e36d8a114365645a8e4032b78a58d0567692106e9d6fb69f17b9964ebc3cb
doc/pkt_line/Pkt_line/Decoder/index.html
Module Pkt_line.Decoder
Module for decoding Git pkt lines, as specified at https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt
In the docs, we define min_pkt_len = 4
as in specs.
val create : unit -> decoder
val decoder_from : string -> decoder
val end_of_input : decoder -> int
val pp_error : error Fmt.t
leave_with d error
raises Leave { error; buffer = d.buffer; committed = d.pos }
safe k decoder
wraps a call k decoder
in a try-with block; if exception Leave err
is raised, the function returns Error of err
val peek_char : decoder -> char option
val string : string -> decoder -> unit
val junk_char : decoder -> unit
val while1 : (char -> bool) -> decoder -> bytes * int * int
val at_least_one_pkt : decoder -> bool
returns true if decoder.max - decoder.pos
is >= min_pkt_len
and >= pkt_len
, where pkt_len
is the length of a pkt line starting at decoder.pos
.
val at_least_one_line : decoder -> bool
val peek_while_eol : decoder -> bytes * int * int
val peek_while_eol_or_space : decoder -> bytes * int * int
val peek_pkt : decoder -> bytes * int * int
val junk_pkt : decoder -> unit
increase decoder.pos
by max min_pkt_len pkt_len
, where pkt_len
is the length of the pkt line starting at the current value of decoder.pos
(before increasing) and min_pkt_len = 4
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>