Module Assemblage.Cmd.Vcs

module Vcs: sig .. end
Version control system operations.

Note. To remain VCS agnostic use the result of Assemblage.Cmd.Vcs.find or Assemblage.Cmd.Vcs.get rather than explicitely mentioning your VCS.



Version control system operations


type t = [ `Git | `Hg ] 
The type for version control systems.
val exists : Assemblage.Cmd.path -> t -> bool Assemblage.Cmd.result
exists d vcs is true if the VCS vcs is detected in directory d.
val find : Assemblage.Cmd.path -> t option Assemblage.Cmd.result
find d looks for an arbitrary VCS in directory d.
val get : Assemblage.Cmd.path -> t Assemblage.Cmd.result
get d is like Assemblage.Cmd.Vcs.exists but returns an error if no VCS was found.
val head : ?dirty:bool ->
Assemblage.Cmd.path -> t -> string Assemblage.Cmd.result
head dirty d vcs is the HEAD commit identifier of the VCS vcs in in directory d. If dirty is true (default) an indicator is appended to the identifier if the working tree is dirty.
val describe : ?dirty:bool ->
Assemblage.Cmd.path -> t -> string Assemblage.Cmd.result
describe dirty d vcs identifies the HEAD commit using tags from the VCS vcs in directory d. If dirty is true (default) an indicator is appended to the identifier if the working tree is dirty.