forked from
gazagnaire.org/irmin
Persistent store with Git semantics: lazy reads, delayed writes, content-addressing
1(** Branches command. *)
2
3let run ~repo ~output () =
4 let config = Config.load ~repo () in
5 let (module B : Common.BACKEND) = Common.backend_of_config config in
6 Eio_main.run @@ fun env ->
7 let fs = Eio.Stdenv.cwd env in
8 Eio.Switch.run @@ fun sw ->
9 let store = B.open_store ~sw ~fs ~config in
10 let bs = B.branches store in
11 (match output with
12 | `Human -> List.iter (Fmt.pr " %s@.") bs
13 | `Json -> Fmt.pr "[%a]@." Fmt.(list ~sep:comma (fmt "%S")) bs);
14 0