Module Vcs.Git

include module type of Vcs.Git
module Output = Vcs.Git.Output
module type S = Vcs.Git.S

This is the interface commonly used by raising and non-raising helper modules, such as Vcs.Git, Vcs_base.Vcs.Git.Or_error, Vcs.Git.Result, Vcs.Git.Rresult, and custom ones built with Vcs.Git.Non_raising.Make. S is parametrized by the result type returned by the helpers.

The interface exposed at the top level of this module are helpers that return direct results, or raise Vcs.E. This module is exported to users as Vcs.Git.

The helpers are suitable for use in combination with the Vcs.git function, which will take care of wrapping the exception with useful context, before re-raising it.

include S with type 'a result := 'a
val exit0 : Vcs__.Git_output0.t -> unit
val exit0_and_stdout : Vcs__.Git_output0.t -> string
val exit_code : Vcs__.Git_output0.t -> accept:(int * 'a) list -> 'a

A convenient wrapper to write exhaustive match on a result conditioned by a list of accepted exit codes. If the exit code is not part of the accepted list, the function takes care of returning an error of the expected result type.

module Non_raising = Vcs.Git.Non_raising
module Rresult = Vcs.Git.Rresult
module Result = Vcs.Git.Result
module Or_error : S with type 'a result := ('a, Base.Error.t) Base.Result.t

Helpers to wrap process outputs.