module P : sig ... endval head : thead is the user-friendly value of HEAD Git reference.
val master : tmaster is the user-friendly value of refs/heads/master Git reference.
val is_head : t -> boolis_head t returns true if t = head.
val of_string : string -> tof_string s returns a valid reference value. A valid value means:
A refname is a hierarchical octet string beginning with "refs/" and not violating the git-check-ref-format command's validation rules. More specifically, they:
- They can include slash
'/'for hierarchical (directory) grouping, but no slash-separated component can begin with a dot'.'. - They must contain at least one
'/'. This enforces the presence of a category like"heads/","tags/"etc. but the actual names are not restricted. - They cannot have two consecutive dots
".."anywhere. - They cannot have ASCII control characters (i.e. bytes whose values are lower than
\040or\177DEL), space, tilde'~', caret'^', colon':', question-mark'?', asterisk'*', or open bracket'['anywhere. - They cannot end with a slash
'/'or a dot'.'. - They cannot end with the sequence
".lock". - They cannot contain a sequence
"@{". - They cannot contain a
'\\'.
val to_string : t -> stringto_string t returns the string value of the reference t.
to_path ref casts a reference ref to a path (as a Window path or Unix path).
module type S = sig ... endInterface to describe the Git reference value head_contents.
module type IO = sig ... endThe interface which describes any I/O operations on Git reference.
The functor to make the OCaml representation of the Git Reference object by a specific hash.