-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exception Invalid_argument("Sync.pull_exn: Handshake got an error") when using Sync #2319
Comments
Hello! I don't have access to a windows machine to test, but your example code works out of the box on my linux... Can you confirm if the following also fails without the irmin dependency?
open Lwt.Syntax
open Lwt.Infix
module Store = Git_unix.Store
module Sync = Git_unix.Sync (Store)
module Uri = Smart_git.Endpoint
let src =
Uri.of_string "https://git.sr.ht/~jonsterling/public-trees" |> Result.get_ok
let main () =
let* ctx = Git_unix.ctx (Happy_eyeballs_lwt.create ()) in
let* store = Store.v Fpath.(v "/tmp" / "gitsync") >|= Result.get_ok in
let+ result = Sync.fetch ~ctx src store `All in
match result with
| Ok (Some (_hash, lst)) ->
Format.printf "Ok! Some list %#i@." (List.length lst)
| Ok None -> Format.printf "Ok! None?@."
| Error (#Mimic.error as e) ->
Format.printf "Mimic error: %a@." Mimic.pp_error e
| Error (`Exn e) -> Format.printf "Git error: %s@." (Printexc.to_string e)
| Error _ -> Format.printf "Git error: <unknown private error tag>@."
let () = Lwt_main.run (main ()) (It prints |
It fails! |
|
Hi! In case it helps, I can also reproduce the |
Hello,
I have the following code which raises an inscrutable error:
Now, the error actually gets raised by ocaml-git, so perhaps I should rather report it in that repo. Nontheless, the code is virtually the same as the one found in the sync example.
Some notes:
Invalid_argument("Sync.pull_exn: not found")
Handshake got an error
, so I don't think it has something to do with the particulars of the sourcehut git server.I'll try to run my code on my native linux machine. If this ends up working, I can confirm that there is a bug when running ocaml-git on WSL.
The text was updated successfully, but these errors were encountered: