Something went wrong. Try again.
A local Git merge queue with content-bound gate verdicts
Something went wrong. Try again.
1.5 kB · 39 lines
OCaml
at main
12345678910111213141516171819202122232425262728293031323334353637383940open Cmdlineropen Cmdliner.Term.Syntaxmodule Command_push = Merge_queue_eio.Command_push
let action out : Common.action Term.t = let+ out and+ remote = let doc = "Push to $(docv) (default: the remote Git pushes each branch to)." in Arg.(value & pos 0 (some string) None & info [] ~docv:"REMOTE" ~doc) and+ branches = let doc = "Publish these branches of the DAG alone, plus any branch they take from \ that the remote lacks (default: every branch of the DAG and \ $(b,mq/config))." in Arg.(value & pos_right 0 Common.branch [] & info [] ~docv:"BRANCH" ~doc) in fun ctx -> Common.result out (Command_push.run ctx ~remote branches)
let cmd = let man = [ `S Manpage.s_description; `P "Publish this machine's landings and their check results, by \ fast-forward, refused when the remote moved. A $(i,BRANCH) outside \ the DAG is refused, the rules branch excepted: a work branch is \ pushed with Git. Only branch heads are sent unless local Git config \ $(b,mq.backupRemote) explicitly names a separate recovery remote."; `P "Before it sends anything it runs the repository's $(b,pre-push) hook \ as $(b,git push) runs it (githooks(5)), and a hook that exits \ non-zero refuses the push."; ] in Common.v "push" ~exits:Act ~json:Common.outcome_json ~doc:"Publish this machine's landings." ~man action