open Cmdliner open Cmdliner.Term.Syntax module Command_pull = Merge_queue_eio.Command_pull let action out : Common.action Term.t = let+ out and+ remote = let doc = "Fetch from $(docv) (default: the remote each branch is pulled from)." in Arg.(value & pos 0 (some string) None & info [] ~docv:"REMOTE" ~doc) and+ no_wait = let doc = "Return once the landings to replay are queued." in Arg.(value & flag & info [ "no-wait" ] ~doc) in fun ctx -> Common.result out (Command_pull.run ctx ~remote ~no_wait) let cmd = let man = [ `S Manpage.s_description; `P "Fetch the agreed copy of each branch of the DAG and of the rules, \ with their check results, and reconcile this machine's landings with \ it: they are landed again on top. Each branch comes from the remote \ Git pulls it from. With a $(i,REMOTE) that holds no agreed copy, \ fetch it and reconcile nothing."; ] in Common.v "pull" ~exits:Pull ~json:Common.outcome_json ~doc:"Bring in the agreed history and its results." ~man action