Vcs.Or_error
An Vcs
API based on Base.Or_error
.
val sexp_of_err : err -> Sexplib0.Sexp.t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
The individual functions are documented the Vcs
module.
include Vcs.Non_raising.S with type 'a t := 'a Vcs.t and type 'a result := 'a t
val init :
[> Vcs.Trait.init ] Vcs.t ->
path:Fpath_sexp0.Absolute_path.t ->
Vcs.Repo_root.t t
val find_enclosing_git_repo_root :
[> Vcs.Trait.file_system ] Vcs.t ->
from:Fpath_sexp0.Absolute_path.t ->
Vcs.Repo_root.t option t
val find_enclosing_repo_root :
[> Vcs.Trait.file_system ] Vcs.t ->
from:Fpath_sexp0.Absolute_path.t ->
store:(Fpath_sexp0.Fsegment.t * 'store) list ->
('store * Vcs.Repo_root.t) option t
val add :
[> Vcs.Trait.add ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
path:Vcs.Path_in_repo.t ->
unit t
val commit :
[> Vcs.Trait.rev_parse | Vcs.Trait.commit ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
commit_message:Vcs.Commit_message.t ->
Vcs.Rev.t t
val current_branch :
[> Vcs.Trait.rev_parse ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
Vcs.Branch_name.t t
val current_revision :
[> Vcs.Trait.rev_parse ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
Vcs.Rev.t t
val ls_files :
[> Vcs.Trait.ls_files ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
below:Vcs.Path_in_repo.t ->
Vcs.Path_in_repo.t list t
val show_file_at_rev :
[> Vcs.Trait.show ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
rev:Vcs.Rev.t ->
path:Vcs.Path_in_repo.t ->
[ `Present of Vcs.File_contents.t | `Absent ] t
val load_file :
[> Vcs.Trait.file_system ] Vcs.t ->
path:Fpath_sexp0.Absolute_path.t ->
Vcs.File_contents.t t
val save_file :
?perms:int ->
[> Vcs.Trait.file_system ] Vcs.t ->
path:Fpath_sexp0.Absolute_path.t ->
file_contents:Vcs.File_contents.t ->
unit t
val read_dir :
[> Vcs.Trait.file_system ] Vcs.t ->
dir:Fpath_sexp0.Absolute_path.t ->
Fpath_sexp0.Fsegment.t list t
val rename_current_branch :
[> Vcs.Trait.branch ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
to_:Vcs.Branch_name.t ->
unit t
val name_status :
[> Vcs.Trait.name_status ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
changed:Vcs.Name_status.Changed.t ->
Vcs.Name_status.t t
val num_status :
[> Vcs.Trait.num_status ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
changed:Vcs.Num_status.Changed.t ->
Vcs.Num_status.t t
val log : [> Vcs.Trait.log ] Vcs.t -> repo_root:Vcs.Repo_root.t -> Vcs.Log.t t
val refs :
[> Vcs.Trait.refs ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
Vcs.Refs.t t
val graph :
[> Vcs.Trait.log | Vcs.Trait.refs ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
Vcs.Graph.t t
val set_user_name :
[> Vcs.Trait.config ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
user_name:Vcs.User_name.t ->
unit t
val set_user_email :
[> Vcs.Trait.config ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
user_email:Vcs.User_email.t ->
unit t
val git :
?env:string array ->
?run_in_subdir:Vcs.Path_in_repo.t ->
[> Vcs.Trait.git ] Vcs.t ->
repo_root:Vcs.Repo_root.t ->
args:string list ->
f:(Vcs__.Git_output0.t -> 'a t) ->
'a t