open Cmdliner open 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)