add progress reporting capability to fetch#405
Conversation
|
Thanks! |
|
I'm curious why pass through such callbacks, where |
|
I think this choice should be made by the end user - currently such outputs is printed by |
|
I don't quite understand. My question is: why should there be two ways to receive output of the git library -- one using |
Ah I think, you refer to the old implementation of Currently, the default is |
|
with this change, I get compilation errors in irmin-git (from @dinosaure's ocaml-git branch): Values do not match:
val fetch :
resolvers:'a ->
'b -> 'c -> ?version:'d -> ?capabilities:'e -> 'f -> 'g
is not included in
val fetch :
?push_stdout:(string -> unit) ->
?push_stderr:(string -> unit) ->
resolvers:Conduit.resolvers ->
Smart_git.endpoint ->
G.t ->
?version:[> `V1 ] ->
?capabilities:Smart.Capability.t list ->
[ `All | `None | `Some of Git__.Reference.t list ] ->
((G.hash * (Git__.Reference.t * G.hash) list) option, error)
result Lwt.t
File "src/git/sync.mli", lines 27-36, characters 2-67:
Expected declaration
File "src/irmin-git/irmin_git.ml", line 1075, characters 6-11:
Actual declaration |
… git-unix (3.0.0) CHANGES: - Rewrite of `ocaml-git` (@dinosaure, mirage/ocaml-git#395) - Delete useless constraints on digestif's signature (@dinosaure, mirage/ocaml-git#399) - Add support of CoHTTP with UNIX and MirageOS (@ulugbekna, mirage/ocaml-git#400) - Add progress reporting on fetch command (@ulugbekna, mirage/ocaml-git#405) - Lint dependencies on packages (`git-cohttp-unix` and `git-cohttp-mirage`) and update to the last version of CoHTTP (@hannesm, mirage/ocaml-git#407) - Fix internal `Cstruct_append` implementation (@dinosaure, mirage/ocaml-git#401) - Implement shallow commit (@dinosaure, mirage/ocaml-git#402) - Update to `conduit.3.0.0` (@dinosaure, mirage/ocaml-git#408) (deleted by the integration of `mimic`) - Delete use of `ocurl` (@dinosaure, mirage/ocaml-git#410) - Delete the useless **old** `git-mirage` package (@hannesm, mirage/ocaml-git#411) - Fix about unresolved endpoint with `conduit.3.0.0` (@dinosaure, mirage/ocaml-git#412) - Refactors fetch command (@ulugbekna, mirage/ocaml-git#404) - Fix ephemerons about temporary devices (@dinosaure, mirage/ocaml-git#413) - Implementation of `ogit-fetch` as an example (@ulugbekna, mirage/ocaml-git#406) - Rename `nss` to `git-nss` (@dinosaure, mirage/ocaml-git#415) - Refactors `git-nss` (@ulugbekna, mirage/ocaml-git#416) - Update README.md (@ulugbekna, mirage/ocaml-git#417) - Replace deprecated `Fmt` functions (@ulugbekna, mirage/ocaml-git#421) - Delete physical equality (@ulugbekna, mirage/ocaml-git#422) - Rename `prelude` argument by `uses_git_transport` (@ulugbekna, mirage/ocaml-git#423) - Refactors Smart decoder (@ulugbekna, mirage/ocaml-git#424) - Constraint to use `fmt.0.8.7` (@dinosaure, mirage/ocaml-git#425) - Small refactors in `git-nss` (@dinosaure, mirage/ocaml-git#427) - Delete `conduit.3.0.0` and replace it by `mimic` (@dinosaure, mirage/ocaml-git#428) - Delete the useless `verify` function on `fetch` and `push` (@dinosaure, mirage/ocaml-git#429) - Delete `pin-depends` on `awa` (@dinosaure, mirage/ocaml-git#431)
…t-unix and git-mirage (3.0.0) CHANGES: - Rewrite of `ocaml-git` (@dinosaure, mirage/ocaml-git#395) - Delete useless constraints on digestif's signature (@dinosaure, mirage/ocaml-git#399) - Add support of CoHTTP with UNIX and MirageOS (@ulugbekna, mirage/ocaml-git#400) - Add progress reporting on fetch command (@ulugbekna, mirage/ocaml-git#405) - Lint dependencies on packages (`git-cohttp-unix` and `git-cohttp-mirage`) and update to the last version of CoHTTP (@hannesm, mirage/ocaml-git#407) - Fix internal `Cstruct_append` implementation (@dinosaure, mirage/ocaml-git#401) - Implement shallow commit (@dinosaure, mirage/ocaml-git#402) - Update to `conduit.3.0.0` (@dinosaure, mirage/ocaml-git#408) (deleted by the integration of `mimic`) - Delete use of `ocurl` (@dinosaure, mirage/ocaml-git#410) - Delete the useless **old** `git-mirage` package (@hannesm, mirage/ocaml-git#411) - Fix about unresolved endpoint with `conduit.3.0.0` (@dinosaure, mirage/ocaml-git#412) - Refactors fetch command (@ulugbekna, mirage/ocaml-git#404) - Fix ephemerons about temporary devices (@dinosaure, mirage/ocaml-git#413) - Implementation of `ogit-fetch` as an example (@ulugbekna, mirage/ocaml-git#406) - Rename `nss` to `git-nss` (@dinosaure, mirage/ocaml-git#415) - Refactors `git-nss` (@ulugbekna, mirage/ocaml-git#416) - Update README.md (@ulugbekna, mirage/ocaml-git#417) - Replace deprecated `Fmt` functions (@ulugbekna, mirage/ocaml-git#421) - Delete physical equality (@ulugbekna, mirage/ocaml-git#422) - Rename `prelude` argument by `uses_git_transport` (@ulugbekna, mirage/ocaml-git#423) - Refactors Smart decoder (@ulugbekna, mirage/ocaml-git#424) - Constraint to use `fmt.0.8.7` (@dinosaure, mirage/ocaml-git#425) - Small refactors in `git-nss` (@dinosaure, mirage/ocaml-git#427) - Delete `conduit.3.0.0` and replace it by `mimic` (@dinosaure, mirage/ocaml-git#428) - Delete the useless `verify` function on `fetch` and `push` (@dinosaure, mirage/ocaml-git#429) - Delete `pin-depends` on `awa` (@dinosaure, mirage/ocaml-git#431)
…t-unix and git-mirage (3.0.0) CHANGES: - Rewrite of `ocaml-git` (@dinosaure, mirage/ocaml-git#395) - Delete useless constraints on digestif's signature (@dinosaure, mirage/ocaml-git#399) - Add support of CoHTTP with UNIX and MirageOS (@ulugbekna, mirage/ocaml-git#400) - Add progress reporting on fetch command (@ulugbekna, mirage/ocaml-git#405) - Lint dependencies on packages (`git-cohttp-unix` and `git-cohttp-mirage`) and update to the last version of CoHTTP (@hannesm, mirage/ocaml-git#407) - Fix internal `Cstruct_append` implementation (@dinosaure, mirage/ocaml-git#401) - Implement shallow commit (@dinosaure, mirage/ocaml-git#402) - Update to `conduit.3.0.0` (@dinosaure, mirage/ocaml-git#408) (deleted by the integration of `mimic`) - Delete use of `ocurl` (@dinosaure, mirage/ocaml-git#410) - Delete the useless **old** `git-mirage` package (@hannesm, mirage/ocaml-git#411) - Fix about unresolved endpoint with `conduit.3.0.0` (@dinosaure, mirage/ocaml-git#412) - Refactors fetch command (@ulugbekna, mirage/ocaml-git#404) - Fix ephemerons about temporary devices (@dinosaure, mirage/ocaml-git#413) - Implementation of `ogit-fetch` as an example (@ulugbekna, mirage/ocaml-git#406) - Rename `nss` to `git-nss` (@dinosaure, mirage/ocaml-git#415) - Refactors `git-nss` (@ulugbekna, mirage/ocaml-git#416) - Update README.md (@ulugbekna, mirage/ocaml-git#417) - Replace deprecated `Fmt` functions (@ulugbekna, mirage/ocaml-git#421) - Delete physical equality (@ulugbekna, mirage/ocaml-git#422) - Rename `prelude` argument by `uses_git_transport` (@ulugbekna, mirage/ocaml-git#423) - Refactors Smart decoder (@ulugbekna, mirage/ocaml-git#424) - Constraint to use `fmt.0.8.7` (@dinosaure, mirage/ocaml-git#425) - Small refactors in `git-nss` (@dinosaure, mirage/ocaml-git#427) - Delete `conduit.3.0.0` and replace it by `mimic` (@dinosaure, mirage/ocaml-git#428) - Delete the useless `verify` function on `fetch` and `push` (@dinosaure, mirage/ocaml-git#429) - Delete `pin-depends` on `awa` (@dinosaure, mirage/ocaml-git#431)
Adds progress reporting capability (as arguments) to fetch through all fetch "levels":
Nss.Fetch.fetch_v1 <- Smart_git.fetch <- Sync.fetch <- Git_unix/Mem.fetch