diff --git a/CHANGES.md b/CHANGES.md
index ce6125c..e53b6e9 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,7 @@
### Changed
+- Rename `vcs-git-cli` to `vcs-git-provider` (breaking change).
- Rename `vcs-git` to `vcs-git-eio` (breaking change).
- Rename `tree` to `graph` to designate the commit graph of a repository (breaking change).
- Upgrade to `cmdlang.0.0.5`.
diff --git a/doc/docs/design/introduction.md b/doc/docs/design/introduction.md
index b739cfc..9c43885 100644
--- a/doc/docs/design/introduction.md
+++ b/doc/docs/design/introduction.md
@@ -16,13 +16,13 @@ The `vcs` repository contains several components:
stateDiagram-v2
vcs : vcs *
user : user-lib *
- vcs_git_cli : vcs-git-cli
+ vcs_git_provider : vcs-git-provider
executable : executable (eio)
- provider : vcs-git
+ provider : vcs-git-eio
runtime : eio
vcs --> user
user --> executable
- vcs_git_cli --> provider
+ vcs_git_provider --> provider
runtime --> provider
provider --> executable
```
@@ -33,21 +33,21 @@ stateDiagram-v2
Also marked with a * to indicate no runtime dependencies.
- **executable**: A placeholder for a runtime component based on `user-lib` that
commits to a specific provider and concurrency model.
-- **vcs-git-cli**: A IO-free library that parses the output of a `git` cli process.
-- **vcs-git**: An instantiation of `Vcs_git_cli` based on an `Eio` runtime.
-- **vcs-git-blocking**: An instantiation of `Vcs_git_cli` based on the OCaml `Stdlib`.
+- **vcs-git-provider**: A IO-free library that parses the output of a `git` cli process.
+- **vcs-git-eio**: An instantiation of `Vcs_git_provider` based on an `Eio` runtime.
+- **vcs-git-blocking**: An instantiation of `Vcs_git_provider` based on the OCaml `Stdlib`.
```mermaid
stateDiagram-v2
vcs : vcs *
user : user-lib *
- vcs_git_cli : vcs-git-cli
+ vcs_git_provider : vcs-git-provider
executable : executable (blocking)
provider : vcs-git-blocking
runtime : stdlib
vcs --> user
user --> executable
- vcs_git_cli --> provider
+ vcs_git_provider --> provider
runtime --> provider
provider --> executable
```
diff --git a/dune-project b/dune-project
index f766235..321de12 100644
--- a/dune-project
+++ b/dune-project
@@ -187,7 +187,7 @@
(= :version))))
(package
- (name vcs-git-cli)
+ (name vcs-git-provider)
(synopsis "An IO-free library that parses the output of Git commands")
(depends
(ocaml
@@ -235,7 +235,8 @@
(package
(name vcs-git-eio)
- (synopsis "A Git provider for Vcs based on Vcs_git_cli for Eio programs")
+ (synopsis
+ "A Git provider for Vcs based on Vcs_git_provider for Eio programs")
(depends
(ocaml
(>= 5.2))
@@ -283,7 +284,7 @@
(>= 0.0.8))
(vcs
(= :version))
- (vcs-git-cli
+ (vcs-git-provider
(= :version))
(vcs-private-libs-eio
(= :version))))
@@ -291,7 +292,7 @@
(package
(name vcs-git-blocking)
(synopsis
- "A Git provider for Vcs based on Vcs_git_cli for blocking programs")
+ "A Git provider for Vcs based on Vcs_git_provider for blocking programs")
(depends
(ocaml
(>= 5.2))
@@ -337,7 +338,7 @@
(>= 0.0.8))
(vcs
(= :version))
- (vcs-git-cli
+ (vcs-git-provider
(= :version))))
(package
@@ -457,7 +458,7 @@
(= :version))
(vcs-git-blocking
(= :version))
- (vcs-git-cli
+ (vcs-git-provider
(= :version))
(vcs-private-libs-base
(= :version))
diff --git a/lib/vcs/test/dune b/lib/vcs/test/dune
index 2a4489c..446bce2 100644
--- a/lib/vcs/test/dune
+++ b/lib/vcs/test/dune
@@ -30,7 +30,7 @@
fpath
fpath-base
vcs
- vcs_git_cli)
+ vcs_git_provider)
(instrumentation
(backend bisect_ppx))
(lint
diff --git a/lib/vcs/test/test__graph.ml b/lib/vcs/test/test__graph.ml
index b997f65..ec6d485 100644
--- a/lib/vcs/test/test__graph.ml
+++ b/lib/vcs/test/test__graph.ml
@@ -26,13 +26,13 @@ let%expect_test "graph" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.log") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- List.map lines ~f:(fun line -> Vcs_git_cli.Log.parse_log_line_exn ~line)
+ List.map lines ~f:(fun line -> Vcs_git_provider.Log.parse_log_line_exn ~line)
in
let refs =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.refs") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- Vcs_git_cli.Refs.parse_lines_exn ~lines
+ Vcs_git_provider.Refs.parse_lines_exn ~lines
in
let graph = Vcs.Graph.create () in
print_s [%sexp { node_count = (Vcs.Graph.node_count graph : int) }];
diff --git a/lib/vcs/test/test__log.ml b/lib/vcs/test/test__log.ml
index 04d9bf1..75939a7 100644
--- a/lib/vcs/test/test__log.ml
+++ b/lib/vcs/test/test__log.ml
@@ -27,7 +27,9 @@ let%expect_test "parse_exn" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.log") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let log = List.map lines ~f:(fun line -> Vcs_git_cli.Log.parse_log_line_exn ~line) in
+ let log =
+ List.map lines ~f:(fun line -> Vcs_git_provider.Log.parse_log_line_exn ~line)
+ in
let roots = Vcs.Log.roots log in
print_s [%sexp (roots : Vcs.Rev.t list)];
[%expect
diff --git a/lib/vcs/test/test__name_status.ml b/lib/vcs/test/test__name_status.ml
index 092837d..911a7d7 100644
--- a/lib/vcs/test/test__name_status.ml
+++ b/lib/vcs/test/test__name_status.ml
@@ -25,7 +25,7 @@ let%expect_test "parse_exn" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.name-status") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let name_status = Vcs_git_cli.Name_status.parse_lines_exn ~lines in
+ let name_status = Vcs_git_provider.Name_status.parse_lines_exn ~lines in
let files_at_src = Vcs.Name_status.files_at_src name_status in
let files_at_dst = Vcs.Name_status.files_at_dst name_status in
print_s [%sexp (Set.diff files_at_dst files_at_src : Set.M(Vcs.Path_in_repo).t)];
@@ -47,7 +47,7 @@ let%expect_test "files" =
; "R100\toriginal_renamed_file\tnew_renamed_file"
]
in
- let name_status = Vcs_git_cli.Name_status.parse_lines_exn ~lines in
+ let name_status = Vcs_git_provider.Name_status.parse_lines_exn ~lines in
print_s [%sexp (name_status : Vcs.Name_status.t)];
[%expect
{|
diff --git a/lib/vcs/test/test__num_status.ml b/lib/vcs/test/test__num_status.ml
index c2583e6..e05e64a 100644
--- a/lib/vcs/test/test__num_status.ml
+++ b/lib/vcs/test/test__num_status.ml
@@ -25,7 +25,7 @@ let%expect_test "parse_exn" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.num-status") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let num_status = Vcs_git_cli.Num_status.parse_lines_exn ~lines in
+ let num_status = Vcs_git_provider.Num_status.parse_lines_exn ~lines in
ignore (num_status : Vcs.Num_status.t);
[%expect {||}];
()
diff --git a/lib/vcs_git_blocking/src/dune b/lib/vcs_git_blocking/src/dune
index 458f859..5bb3c34 100644
--- a/lib/vcs_git_blocking/src/dune
+++ b/lib/vcs_git_blocking/src/dune
@@ -11,7 +11,7 @@
Base
-open
Fpath_base)
- (libraries base fpath fpath-base provider unix vcs vcs-git-cli)
+ (libraries base fpath fpath-base provider unix vcs vcs-git-provider)
(instrumentation
(backend bisect_ppx))
(lint
diff --git a/lib/vcs_git_blocking/src/runtime.mli b/lib/vcs_git_blocking/src/runtime.mli
index f6fd6dc..3a0144f 100644
--- a/lib/vcs_git_blocking/src/runtime.mli
+++ b/lib/vcs_git_blocking/src/runtime.mli
@@ -21,6 +21,6 @@
type t
-include Vcs_git_cli.Runtime.S with type t := t
+include Vcs_git_provider.Runtime.S with type t := t
val create : unit -> t
diff --git a/lib/vcs_git_blocking/src/vcs_git_blocking.ml b/lib/vcs_git_blocking/src/vcs_git_blocking.ml
index d7529a6..ce6f507 100644
--- a/lib/vcs_git_blocking/src/vcs_git_blocking.ml
+++ b/lib/vcs_git_blocking/src/vcs_git_blocking.ml
@@ -19,12 +19,12 @@
(* and , respectively. *)
(*******************************************************************************)
-type 'a t = ([> Vcs_git_cli.Trait.t ] as 'a) Vcs.t
-type t' = Vcs_git_cli.Trait.t t
+type 'a t = ([> Vcs_git_provider.Trait.t ] as 'a) Vcs.t
+type t' = Vcs_git_provider.Trait.t t
module Impl = struct
include Runtime
- include Vcs_git_cli.Make (Runtime)
+ include Vcs_git_provider.Make (Runtime)
end
let create () = Vcs.create (Provider.T { t = Impl.create (); handler = Impl.handler () })
diff --git a/lib/vcs_git_blocking/src/vcs_git_blocking.mli b/lib/vcs_git_blocking/src/vcs_git_blocking.mli
index 20a55ff..b644fba 100644
--- a/lib/vcs_git_blocking/src/vcs_git_blocking.mli
+++ b/lib/vcs_git_blocking/src/vcs_git_blocking.mli
@@ -20,18 +20,18 @@
(*_******************************************************************************)
(** Implementation of a git provider for the {!module:Vcs} library, based on
- [Stdlib] and {!module:Vcs_git_cli}.
+ [Stdlib] and {!module:Vcs_git_provider}.
This implementation is based on the [git] command line tool. We run it as an
external program with utils from [Stdlib] and [Unix], producing the right
command line invocation and parsing the output to produce a typed version of
- the expected results with [Vcs_git_cli]. Note that [git] must be found in the
+ the expected results with [Vcs_git_provider]. Note that [git] must be found in the
PATH of the running environment. *)
-type 'a t = ([> Vcs_git_cli.Trait.t ] as 'a) Vcs.t
+type 'a t = ([> Vcs_git_provider.Trait.t ] as 'a) Vcs.t
(** This is a convenient type alias that may be used to designate a provider
with the exact list of traits supported by this implementation. *)
-type t' = Vcs_git_cli.Trait.t t
+type t' = Vcs_git_provider.Trait.t t
val create : unit -> _ t
diff --git a/lib/vcs_git_eio/src/dune b/lib/vcs_git_eio/src/dune
index 9ac7269..e6ffc46 100644
--- a/lib/vcs_git_eio/src/dune
+++ b/lib/vcs_git_eio/src/dune
@@ -21,7 +21,7 @@
fpath
fpath-base
vcs
- vcs-git-cli
+ vcs-git-provider
vcs-private-libs-eio.eio-process)
(instrumentation
(backend bisect_ppx))
diff --git a/lib/vcs_git_eio/src/runtime.mli b/lib/vcs_git_eio/src/runtime.mli
index c099ee5..c4491bf 100644
--- a/lib/vcs_git_eio/src/runtime.mli
+++ b/lib/vcs_git_eio/src/runtime.mli
@@ -21,6 +21,6 @@
type t
-include Vcs_git_cli.Runtime.S with type t := t
+include Vcs_git_provider.Runtime.S with type t := t
val create : env:< fs : _ Eio.Path.t ; process_mgr : _ Eio.Process.mgr ; .. > -> t
diff --git a/lib/vcs_git_eio/src/vcs_git_eio.ml b/lib/vcs_git_eio/src/vcs_git_eio.ml
index 881ead5..c6d4218 100644
--- a/lib/vcs_git_eio/src/vcs_git_eio.ml
+++ b/lib/vcs_git_eio/src/vcs_git_eio.ml
@@ -19,12 +19,12 @@
(* and , respectively. *)
(*******************************************************************************)
-type 'a t = ([> Vcs_git_cli.Trait.t ] as 'a) Vcs.t
-type t' = Vcs_git_cli.Trait.t t
+type 'a t = ([> Vcs_git_provider.Trait.t ] as 'a) Vcs.t
+type t' = Vcs_git_provider.Trait.t t
module Impl = struct
include Runtime
- include Vcs_git_cli.Make (Runtime)
+ include Vcs_git_provider.Make (Runtime)
end
let create ~env =
diff --git a/lib/vcs_git_eio/src/vcs_git_eio.mli b/lib/vcs_git_eio/src/vcs_git_eio.mli
index 9d0d991..23128cc 100644
--- a/lib/vcs_git_eio/src/vcs_git_eio.mli
+++ b/lib/vcs_git_eio/src/vcs_git_eio.mli
@@ -20,19 +20,19 @@
(*_******************************************************************************)
(** Implementation of a git provider for the {!module:Vcs} library, based on
- [Eio] and {!module:Vcs_git_cli}.
+ [Eio] and {!module:Vcs_git_provider}.
This implementation is based on the [git] command line tool. We run it as an
external program within an [Eio] environment, producing the right command line
invocation and parsing the output to produce a typed version of the expected
- results with [Vcs_git_cli]. Note that [git] must be found in the PATH of the
+ results with [Vcs_git_provider]. Note that [git] must be found in the PATH of the
running environment. *)
-type 'a t = ([> Vcs_git_cli.Trait.t ] as 'a) Vcs.t
+type 'a t = ([> Vcs_git_provider.Trait.t ] as 'a) Vcs.t
(** This is a convenient type alias that may be used to designate a provider
with the exact list of traits supported by this implementation. *)
-type t' = Vcs_git_cli.Trait.t t
+type t' = Vcs_git_provider.Trait.t t
(** [create ~env] creates a [vcs] value that can be used by the {!module:Vcs}
library. *)
diff --git a/lib/vcs_git_cli/src/add.ml b/lib/vcs_git_provider/src/add.ml
similarity index 100%
rename from lib/vcs_git_cli/src/add.ml
rename to lib/vcs_git_provider/src/add.ml
diff --git a/lib/vcs_git_cli/src/add.mli b/lib/vcs_git_provider/src/add.mli
similarity index 100%
rename from lib/vcs_git_cli/src/add.mli
rename to lib/vcs_git_provider/src/add.mli
diff --git a/lib/vcs_git_cli/src/branch.ml b/lib/vcs_git_provider/src/branch.ml
similarity index 100%
rename from lib/vcs_git_cli/src/branch.ml
rename to lib/vcs_git_provider/src/branch.ml
diff --git a/lib/vcs_git_cli/src/branch.mli b/lib/vcs_git_provider/src/branch.mli
similarity index 100%
rename from lib/vcs_git_cli/src/branch.mli
rename to lib/vcs_git_provider/src/branch.mli
diff --git a/lib/vcs_git_cli/src/commit.ml b/lib/vcs_git_provider/src/commit.ml
similarity index 100%
rename from lib/vcs_git_cli/src/commit.ml
rename to lib/vcs_git_provider/src/commit.ml
diff --git a/lib/vcs_git_cli/src/commit.mli b/lib/vcs_git_provider/src/commit.mli
similarity index 100%
rename from lib/vcs_git_cli/src/commit.mli
rename to lib/vcs_git_provider/src/commit.mli
diff --git a/lib/vcs_git_cli/src/config.ml b/lib/vcs_git_provider/src/config.ml
similarity index 100%
rename from lib/vcs_git_cli/src/config.ml
rename to lib/vcs_git_provider/src/config.ml
diff --git a/lib/vcs_git_cli/src/config.mli b/lib/vcs_git_provider/src/config.mli
similarity index 100%
rename from lib/vcs_git_cli/src/config.mli
rename to lib/vcs_git_provider/src/config.mli
diff --git a/lib/vcs_git_cli/src/dune b/lib/vcs_git_provider/src/dune
similarity index 89%
rename from lib/vcs_git_cli/src/dune
rename to lib/vcs_git_provider/src/dune
index 04d6279..de7675b 100644
--- a/lib/vcs_git_cli/src/dune
+++ b/lib/vcs_git_provider/src/dune
@@ -1,6 +1,6 @@
(library
- (name vcs_git_cli)
- (public_name vcs-git-cli)
+ (name vcs_git_provider)
+ (public_name vcs-git-provider)
(flags
:standard
-w
diff --git a/lib/vcs_git_cli/src/init.ml b/lib/vcs_git_provider/src/init.ml
similarity index 100%
rename from lib/vcs_git_cli/src/init.ml
rename to lib/vcs_git_provider/src/init.ml
diff --git a/lib/vcs_git_cli/src/init.mli b/lib/vcs_git_provider/src/init.mli
similarity index 100%
rename from lib/vcs_git_cli/src/init.mli
rename to lib/vcs_git_provider/src/init.mli
diff --git a/lib/vcs_git_cli/src/log.ml b/lib/vcs_git_provider/src/log.ml
similarity index 100%
rename from lib/vcs_git_cli/src/log.ml
rename to lib/vcs_git_provider/src/log.ml
diff --git a/lib/vcs_git_cli/src/log.mli b/lib/vcs_git_provider/src/log.mli
similarity index 100%
rename from lib/vcs_git_cli/src/log.mli
rename to lib/vcs_git_provider/src/log.mli
diff --git a/lib/vcs_git_cli/src/ls_files.ml b/lib/vcs_git_provider/src/ls_files.ml
similarity index 100%
rename from lib/vcs_git_cli/src/ls_files.ml
rename to lib/vcs_git_provider/src/ls_files.ml
diff --git a/lib/vcs_git_cli/src/ls_files.mli b/lib/vcs_git_provider/src/ls_files.mli
similarity index 100%
rename from lib/vcs_git_cli/src/ls_files.mli
rename to lib/vcs_git_provider/src/ls_files.mli
diff --git a/lib/vcs_git_cli/src/munged_path.ml b/lib/vcs_git_provider/src/munged_path.ml
similarity index 95%
rename from lib/vcs_git_cli/src/munged_path.ml
rename to lib/vcs_git_provider/src/munged_path.ml
index d84e2d8..50d8dd5 100644
--- a/lib/vcs_git_cli/src/munged_path.ml
+++ b/lib/vcs_git_provider/src/munged_path.ml
@@ -55,5 +55,8 @@ let parse_exn str =
| exn ->
raise_s
[%sexp
- "Vcs_git_cli.Munged_path.parse_exn", "invalid path", (str : string), (exn : Exn.t)]
+ "Vcs_git_provider.Munged_path.parse_exn"
+ , "invalid path"
+ , (str : string)
+ , (exn : Exn.t)]
;;
diff --git a/lib/vcs_git_cli/src/munged_path.mli b/lib/vcs_git_provider/src/munged_path.mli
similarity index 100%
rename from lib/vcs_git_cli/src/munged_path.mli
rename to lib/vcs_git_provider/src/munged_path.mli
diff --git a/lib/vcs_git_cli/src/name_status.ml b/lib/vcs_git_provider/src/name_status.ml
similarity index 100%
rename from lib/vcs_git_cli/src/name_status.ml
rename to lib/vcs_git_provider/src/name_status.ml
diff --git a/lib/vcs_git_cli/src/name_status.mli b/lib/vcs_git_provider/src/name_status.mli
similarity index 100%
rename from lib/vcs_git_cli/src/name_status.mli
rename to lib/vcs_git_provider/src/name_status.mli
diff --git a/lib/vcs_git_cli/src/num_status.ml b/lib/vcs_git_provider/src/num_status.ml
similarity index 100%
rename from lib/vcs_git_cli/src/num_status.ml
rename to lib/vcs_git_provider/src/num_status.ml
diff --git a/lib/vcs_git_cli/src/num_status.mli b/lib/vcs_git_provider/src/num_status.mli
similarity index 100%
rename from lib/vcs_git_cli/src/num_status.mli
rename to lib/vcs_git_provider/src/num_status.mli
diff --git a/lib/vcs_git_cli/src/refs.ml b/lib/vcs_git_provider/src/refs.ml
similarity index 100%
rename from lib/vcs_git_cli/src/refs.ml
rename to lib/vcs_git_provider/src/refs.ml
diff --git a/lib/vcs_git_cli/src/refs.mli b/lib/vcs_git_provider/src/refs.mli
similarity index 100%
rename from lib/vcs_git_cli/src/refs.mli
rename to lib/vcs_git_provider/src/refs.mli
diff --git a/lib/vcs_git_cli/src/rev_parse.ml b/lib/vcs_git_provider/src/rev_parse.ml
similarity index 100%
rename from lib/vcs_git_cli/src/rev_parse.ml
rename to lib/vcs_git_provider/src/rev_parse.ml
diff --git a/lib/vcs_git_cli/src/rev_parse.mli b/lib/vcs_git_provider/src/rev_parse.mli
similarity index 100%
rename from lib/vcs_git_cli/src/rev_parse.mli
rename to lib/vcs_git_provider/src/rev_parse.mli
diff --git a/lib/vcs_git_cli/src/runtime.mli b/lib/vcs_git_provider/src/runtime.mli
similarity index 96%
rename from lib/vcs_git_cli/src/runtime.mli
rename to lib/vcs_git_provider/src/runtime.mli
index 2e312fc..b3007aa 100644
--- a/lib/vcs_git_cli/src/runtime.mli
+++ b/lib/vcs_git_provider/src/runtime.mli
@@ -21,7 +21,7 @@
(** Defining the interface of a compatible runtime.
- The other modules defined by [Vcs_git_cli] are all functors that are
+ The other modules defined by [Vcs_git_provider] are all functors that are
parametrized by this interface. *)
module type S = sig
diff --git a/lib/vcs_git_cli/src/show.ml b/lib/vcs_git_provider/src/show.ml
similarity index 100%
rename from lib/vcs_git_cli/src/show.ml
rename to lib/vcs_git_provider/src/show.ml
diff --git a/lib/vcs_git_cli/src/show.mli b/lib/vcs_git_provider/src/show.mli
similarity index 100%
rename from lib/vcs_git_cli/src/show.mli
rename to lib/vcs_git_provider/src/show.mli
diff --git a/lib/vcs_git_cli/src/vcs_git_cli.ml b/lib/vcs_git_provider/src/vcs_git_provider.ml
similarity index 100%
rename from lib/vcs_git_cli/src/vcs_git_cli.ml
rename to lib/vcs_git_provider/src/vcs_git_provider.ml
diff --git a/lib/vcs_git_cli/src/vcs_git_cli.mli b/lib/vcs_git_provider/src/vcs_git_provider.mli
similarity index 86%
rename from lib/vcs_git_cli/src/vcs_git_cli.mli
rename to lib/vcs_git_provider/src/vcs_git_provider.mli
index 6dbd70c..96ad891 100644
--- a/lib/vcs_git_cli/src/vcs_git_cli.mli
+++ b/lib/vcs_git_provider/src/vcs_git_provider.mli
@@ -19,18 +19,19 @@
(*_ and , respectively. *)
(*_******************************************************************************)
-(** [Vcs_git_cli] is a helper library to build git providers for the [Vcs] library.
+(** [Vcs_git_provider] is a helper library to build git providers for the [Vcs]
+ library.
- Given the ability to run a [git] process, [Vcs_git_cli] knows what command to
- run, how to parse its output and how to interpret its exit code to turn it
- into a typed result.
+ Given the ability to run a [git] process, [Vcs_git_provider] knows what
+ command to run, how to parse its output and how to interpret its exit code
+ to turn it into a typed result.
- [Vcs_git_cli] is not meant to be used directly by a user. Rather it is one of
- the building blocks involved in creating a git provider for the [Vcs]
+ [Vcs_git_provider] is not meant to be used directly by a user. Rather it is
+ one of the building blocks involved in creating a git provider for the [Vcs]
library.
- [Vcs_git_cli] has currently two instantiations as part of its distribution
- (packaged separately to keep the dependencies isolated).
+ [Vcs_git_provider] has currently two instantiations as part of its
+ distribution (packaged separately to keep the dependencies isolated).
- One based on the [Eio] runtime
- One based on the [Stdlib.Unix] runtime, for blocking programs.
@@ -46,7 +47,7 @@ module Runtime = Runtime
(** {1 Providers of Vcs Traits} *)
module Trait : sig
- (** The list of traits that are implemented in [Vcs_git_cli]. *)
+ (** The list of traits that are implemented in [Vcs_git_provider]. *)
type t =
[ Vcs.Trait.add
| Vcs.Trait.branch
diff --git a/lib/vcs_git_cli/test/README.md b/lib/vcs_git_provider/test/README.md
similarity index 84%
rename from lib/vcs_git_cli/test/README.md
rename to lib/vcs_git_provider/test/README.md
index 8c808ff..768309b 100644
--- a/lib/vcs_git_cli/test/README.md
+++ b/lib/vcs_git_provider/test/README.md
@@ -1,6 +1,6 @@
# Testing the Git Command Line Interface Parsing Logic
-This directory contains tests for the parsing logic implemented in the `Vcs_git_cli` module. The focus here is on validating the parsing of specific command outputs, rather than testing the entire process invocation. The latter is covered in the `Vcs_git_test` module.
+This directory contains tests for the parsing logic implemented in the `Vcs_git_provider` module. The focus here is on validating the parsing of specific command outputs, rather than testing the entire process invocation. The latter is covered in the `Vcs_git_test` module.
## Testing Pattern
diff --git a/lib/vcs_git_cli/test/dune b/lib/vcs_git_provider/test/dune
similarity index 91%
rename from lib/vcs_git_cli/test/dune
rename to lib/vcs_git_provider/test/dune
index a7b80fd..814817a 100644
--- a/lib/vcs_git_cli/test/dune
+++ b/lib/vcs_git_provider/test/dune
@@ -1,6 +1,6 @@
(library
- (name vcs_git_cli_test)
- (public_name vcs-tests.vcs_git_cli_test)
+ (name vcs_git_provider_test)
+ (public_name vcs-tests.vcs_git_provider_test)
(inline_tests
(deps
(glob_files *.name-status)
@@ -22,7 +22,7 @@
eio
eio_main
expect_test_helpers_core.expect_test_helpers_base
- vcs_git_cli)
+ vcs_git_provider)
(instrumentation
(backend bisect_ppx))
(lint
diff --git a/lib/vcs_git_cli/test/test__log.ml b/lib/vcs_git_provider/test/test__log.ml
similarity index 95%
rename from lib/vcs_git_cli/test/test__log.ml
rename to lib/vcs_git_provider/test/test__log.ml
index f9c81bd..cc0013c 100644
--- a/lib/vcs_git_cli/test/test__log.ml
+++ b/lib/vcs_git_provider/test/test__log.ml
@@ -33,7 +33,9 @@ let%expect_test "parse_exn" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.log") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let log = List.map lines ~f:(fun line -> Vcs_git_cli.Log.parse_log_line_exn ~line) in
+ let log =
+ List.map lines ~f:(fun line -> Vcs_git_provider.Log.parse_log_line_exn ~line)
+ in
let roots = Vcs.Log.roots log in
print_s [%sexp (roots : Vcs.Rev.t list)];
[%expect
@@ -52,7 +54,7 @@ let%expect_test "parse_exn" =
let%expect_test "invalid lines" =
let test line =
- print_s [%sexp (Vcs_git_cli.Log.parse_log_line_exn ~line : Vcs.Log.Line.t)]
+ print_s [%sexp (Vcs_git_provider.Log.parse_log_line_exn ~line : Vcs.Log.Line.t)]
in
test "35760b109070be51b9deb61c8fdc79c0b2d9065d";
[%expect {| (Root (rev 35760b109070be51b9deb61c8fdc79c0b2d9065d)) |}];
diff --git a/lib/vcs_git_cli/test/test__log.mli b/lib/vcs_git_provider/test/test__log.mli
similarity index 100%
rename from lib/vcs_git_cli/test/test__log.mli
rename to lib/vcs_git_provider/test/test__log.mli
diff --git a/lib/vcs_git_cli/test/test__munged_path.ml b/lib/vcs_git_provider/test/test__munged_path.ml
similarity index 93%
rename from lib/vcs_git_cli/test/test__munged_path.ml
rename to lib/vcs_git_provider/test/test__munged_path.ml
index 3375e95..2401c11 100644
--- a/lib/vcs_git_cli/test/test__munged_path.ml
+++ b/lib/vcs_git_provider/test/test__munged_path.ml
@@ -19,14 +19,14 @@
(* and , respectively. *)
(*******************************************************************************)
-module Munged_path = Vcs_git_cli.Private.Munged_path
+module Munged_path = Vcs_git_provider.Private.Munged_path
let%expect_test "parse" =
let test path = print_s [%sexp (Munged_path.parse_exn path : Munged_path.t)] in
require_does_raise [%here] (fun () -> test "");
[%expect
{|
- (Vcs_git_cli.Munged_path.parse_exn
+ (Vcs_git_provider.Munged_path.parse_exn
"invalid path"
""
(Invalid_argument "\"\": invalid path"))
@@ -34,7 +34,7 @@ let%expect_test "parse" =
require_does_raise [%here] (fun () -> test "/tmp => /tmp");
[%expect
{|
- (Vcs_git_cli.Munged_path.parse_exn
+ (Vcs_git_provider.Munged_path.parse_exn
"invalid path"
"/tmp => /tmp"
(Invalid_argument "\"/tmp\": not a relative path"))
@@ -42,7 +42,7 @@ let%expect_test "parse" =
require_does_raise [%here] (fun () -> test "tmp => tmp2 => tmp3");
[%expect
{|
- (Vcs_git_cli.Munged_path.parse_exn
+ (Vcs_git_provider.Munged_path.parse_exn
"invalid path"
"tmp => tmp2 => tmp3"
"Too many '=>'") |}];
diff --git a/lib/vcs_git_cli/test/test__munged_path.mli b/lib/vcs_git_provider/test/test__munged_path.mli
similarity index 100%
rename from lib/vcs_git_cli/test/test__munged_path.mli
rename to lib/vcs_git_provider/test/test__munged_path.mli
diff --git a/lib/vcs_git_cli/test/test__name_status.ml b/lib/vcs_git_provider/test/test__name_status.ml
similarity index 95%
rename from lib/vcs_git_cli/test/test__name_status.ml
rename to lib/vcs_git_provider/test/test__name_status.ml
index 30d606c..35d3130 100644
--- a/lib/vcs_git_cli/test/test__name_status.ml
+++ b/lib/vcs_git_provider/test/test__name_status.ml
@@ -34,7 +34,7 @@ let%expect_test "parse_exn" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.name-status") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let name_status = Vcs_git_cli.Name_status.parse_lines_exn ~lines in
+ let name_status = Vcs_git_provider.Name_status.parse_lines_exn ~lines in
print_s [%sexp (name_status : Vcs.Name_status.t)];
[%expect
{|
@@ -170,9 +170,11 @@ let%expect_test "Diff_status" =
let entries = "ADMUQI?!XRCZ" in
String.iter entries ~f:(fun char ->
let diff_status =
- Vcs_git_cli.Name_status.Diff_status.parse_exn (Printf.sprintf "%c something" char)
+ Vcs_git_provider.Name_status.Diff_status.parse_exn
+ (Printf.sprintf "%c something" char)
in
- print_s [%sexp (char : Char.t), (diff_status : Vcs_git_cli.Name_status.Diff_status.t)]);
+ print_s
+ [%sexp (char : Char.t), (diff_status : Vcs_git_provider.Name_status.Diff_status.t)]);
[%expect
{|
(A A)
@@ -187,7 +189,8 @@ let%expect_test "Diff_status" =
(R R)
(C C)
(Z Not_supported) |}];
- require_does_raise [%here] (fun () -> Vcs_git_cli.Name_status.Diff_status.parse_exn "");
+ require_does_raise [%here] (fun () ->
+ Vcs_git_provider.Name_status.Diff_status.parse_exn "");
[%expect {|
"Unexpected empty diff status" |}];
()
@@ -216,7 +219,7 @@ let%expect_test "parse_lines_exn" =
in
List.iter lines ~f:(fun line ->
let result =
- Or_error.try_with (fun () -> Vcs_git_cli.Name_status.parse_line_exn ~line)
+ Or_error.try_with (fun () -> Vcs_git_provider.Name_status.parse_line_exn ~line)
in
print_s [%sexp (line : string), (result : Vcs.Name_status.Change.t Or_error.t)]);
[%expect
diff --git a/lib/vcs_git_cli/test/test__name_status.mli b/lib/vcs_git_provider/test/test__name_status.mli
similarity index 100%
rename from lib/vcs_git_cli/test/test__name_status.mli
rename to lib/vcs_git_provider/test/test__name_status.mli
diff --git a/lib/vcs_git_cli/test/test__num_status.ml b/lib/vcs_git_provider/test/test__num_status.ml
similarity index 98%
rename from lib/vcs_git_cli/test/test__num_status.ml
rename to lib/vcs_git_provider/test/test__num_status.ml
index 102317d..e1cf640 100644
--- a/lib/vcs_git_cli/test/test__num_status.ml
+++ b/lib/vcs_git_provider/test/test__num_status.ml
@@ -27,7 +27,7 @@ let%expect_test "parse_exn - super-master-mind" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.num-status") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let num_status = Vcs_git_cli.Num_status.parse_lines_exn ~lines in
+ let num_status = Vcs_git_provider.Num_status.parse_lines_exn ~lines in
print_s [%sexp (num_status : Vcs.Num_status.t)];
[%expect
{|
@@ -331,7 +331,7 @@ let%expect_test "parse_exn - eio" =
let path = Eio.Path.(Eio.Stdenv.fs env / "eio.num-status") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let num_status = Vcs_git_cli.Num_status.parse_lines_exn ~lines in
+ let num_status = Vcs_git_provider.Num_status.parse_lines_exn ~lines in
print_s [%sexp (num_status : Vcs.Num_status.t)];
[%expect
{|
@@ -472,7 +472,7 @@ let%expect_test "parse_lines_exn" =
in
List.iter lines ~f:(fun line ->
let result =
- Or_error.try_with (fun () -> Vcs_git_cli.Num_status.parse_line_exn ~line)
+ Or_error.try_with (fun () -> Vcs_git_provider.Num_status.parse_line_exn ~line)
in
print_s [%sexp (line : string), (result : Vcs.Num_status.Change.t Or_error.t)]);
[%expect
diff --git a/lib/vcs_git_cli/test/test__num_status.mli b/lib/vcs_git_provider/test/test__num_status.mli
similarity index 100%
rename from lib/vcs_git_cli/test/test__num_status.mli
rename to lib/vcs_git_provider/test/test__num_status.mli
diff --git a/lib/vcs_git_cli/test/test__refs.ml b/lib/vcs_git_provider/test/test__refs.ml
similarity index 94%
rename from lib/vcs_git_cli/test/test__refs.ml
rename to lib/vcs_git_provider/test/test__refs.ml
index 4ed5902..ba28e3c 100644
--- a/lib/vcs_git_cli/test/test__refs.ml
+++ b/lib/vcs_git_provider/test/test__refs.ml
@@ -33,7 +33,7 @@ let%expect_test "parse_exn" =
let path = Eio.Path.(Eio.Stdenv.fs env / "super-master-mind.refs") in
let contents = Eio.Path.load path in
let lines = String.split_lines contents in
- let refs = Vcs_git_cli.Refs.parse_lines_exn ~lines in
+ let refs = Vcs_git_provider.Refs.parse_lines_exn ~lines in
print_s
[%sexp
{ tags = (Vcs.Refs.tags refs : Set.M(Vcs.Tag_name).t)
@@ -56,7 +56,7 @@ let%expect_test "parse_exn" =
let%expect_test "parse_ref_kind_exn" =
let test_ref_kind str =
print_s
- [%sexp (Vcs_git_cli.Refs.Dereferenced.parse_ref_kind_exn str : Vcs.Ref_kind.t)]
+ [%sexp (Vcs_git_provider.Refs.Dereferenced.parse_ref_kind_exn str : Vcs.Ref_kind.t)]
in
require_does_raise [%here] (fun () -> test_ref_kind "blah");
[%expect {| (Invalid_argument "String.chop_prefix_exn \"blah\" \"refs/\"") |}];
@@ -84,7 +84,8 @@ let%expect_test "dereferenced" =
let test line =
print_s
[%sexp
- (Vcs_git_cli.Refs.Dereferenced.parse_exn ~line : Vcs_git_cli.Refs.Dereferenced.t)]
+ (Vcs_git_provider.Refs.Dereferenced.parse_exn ~line
+ : Vcs_git_provider.Refs.Dereferenced.t)]
in
require_does_raise [%here] (fun () -> test "");
[%expect {| ("Invalid ref line" "") |}];
diff --git a/lib/vcs_git_cli/test/test__refs.mli b/lib/vcs_git_provider/test/test__refs.mli
similarity index 100%
rename from lib/vcs_git_cli/test/test__refs.mli
rename to lib/vcs_git_provider/test/test__refs.mli
diff --git a/lib/vcs_git_cli/test/test__show.ml b/lib/vcs_git_provider/test/test__show.ml
similarity index 97%
rename from lib/vcs_git_cli/test/test__show.ml
rename to lib/vcs_git_provider/test/test__show.ml
index 23c567f..9f810e2 100644
--- a/lib/vcs_git_cli/test/test__show.ml
+++ b/lib/vcs_git_provider/test/test__show.ml
@@ -23,7 +23,7 @@ let%expect_test "show" =
let test output =
print_s
[%sexp
- (Vcs_git_cli.Show.interpret_output output
+ (Vcs_git_provider.Show.interpret_output output
: [ `Absent | `Present of Vcs.File_contents.t ] Or_error.t)]
in
test { exit_code = 0; stdout = "contents"; stderr = "" };
diff --git a/lib/vcs_git_cli/test/test__show.mli b/lib/vcs_git_provider/test/test__show.mli
similarity index 100%
rename from lib/vcs_git_cli/test/test__show.mli
rename to lib/vcs_git_provider/test/test__show.mli
diff --git a/vcs-git-blocking.opam b/vcs-git-blocking.opam
index df7bfec..613954f 100644
--- a/vcs-git-blocking.opam
+++ b/vcs-git-blocking.opam
@@ -1,6 +1,7 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
-synopsis: "A Git provider for Vcs based on Vcs_git_cli for blocking programs"
+synopsis:
+ "A Git provider for Vcs based on Vcs_git_provider for blocking programs"
maintainer: ["Mathieu Barbin"]
authors: ["Mathieu Barbin"]
license: "LGPL-3.0-or-later WITH LGPL-3.0-linking-exception"
@@ -23,7 +24,7 @@ depends: [
"ppxlib" {>= "0.33"}
"provider" {>= "0.0.8"}
"vcs" {= version}
- "vcs-git-cli" {= version}
+ "vcs-git-provider" {= version}
"odoc" {with-doc}
]
build: [
diff --git a/vcs-git-eio.opam b/vcs-git-eio.opam
index ce50e8b..66fce8b 100644
--- a/vcs-git-eio.opam
+++ b/vcs-git-eio.opam
@@ -1,6 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
-synopsis: "A Git provider for Vcs based on Vcs_git_cli for Eio programs"
+synopsis: "A Git provider for Vcs based on Vcs_git_provider for Eio programs"
maintainer: ["Mathieu Barbin"]
authors: ["Mathieu Barbin"]
license: "LGPL-3.0-or-later WITH LGPL-3.0-linking-exception"
@@ -24,7 +24,7 @@ depends: [
"ppxlib" {>= "0.33"}
"provider" {>= "0.0.8"}
"vcs" {= version}
- "vcs-git-cli" {= version}
+ "vcs-git-provider" {= version}
"vcs-private-libs-eio" {= version}
"odoc" {with-doc}
]
diff --git a/vcs-git-cli.opam b/vcs-git-provider.opam
similarity index 100%
rename from vcs-git-cli.opam
rename to vcs-git-provider.opam
diff --git a/vcs-tests.opam b/vcs-tests.opam
index 7a22671..b686df8 100644
--- a/vcs-tests.opam
+++ b/vcs-tests.opam
@@ -46,7 +46,7 @@ depends: [
"vcs-command" {= version}
"vcs-git-eio" {= version}
"vcs-git-blocking" {= version}
- "vcs-git-cli" {= version}
+ "vcs-git-provider" {= version}
"vcs-private-libs-base" {= version}
"vcs-private-libs-eio" {= version}
"vcs-test-helpers" {= version}