Persistent store with Git semantics: lazy reads, delayed writes, content-addressing
at inline-small-objects 14 lines 469 B view raw
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