Something went wrong. Try again.
Git-native issue tracker
Something went wrong. Try again.
640 B · 21 lines
OCaml
at main
12345678910111213141516171819202122open Cmdlineropen Common
let sync root authority = run_write @@ fun ~sw ~fs ~net ~mono -> let* store, repo, remote = failed ( with_store ~sw ~fs ~root @@ fun ~store ~repo ~commit:_ ~tree -> let* url = configured_authority ~repo ~tree authority in let* remote = remote_of_url ~fs ~net url in Ok (store, repo, remote) ) in let* _ = Store.sync_remote_checked ~sw ~fs ~net ~mono ~repo ~remote in Fmt.epr "tracker: %a@." Fpath.pp store; Fmt.pr "synced@."; Ok ()
let cmd = Cmd.v (Cmd.info "sync" ~doc:"Sync canonical Git facts with an authority.") Term.(const sync $ root $ authority)