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