123456789101112131415161718192021222324252627282930313233343536373839404142434445464748(*
* Copyright (c) 2013-2017 Thomas Gazagnaire <thomas@gazagnaire.org>
* and Romain Calascibetta <romain.calascibetta@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)moduleStore=Git_unix.StoremoduleGraph=Git.Object_graph.Make(Store)letprinters=["Git.Crc32.pp";"Git.User.pp";"Git_top.Store.Value.pp";"Git_top.Store.Value.Commit.pp";"Git_top.Store.Value.Blob.pp";"Git_top.Store.Value.Tree.pp";"Git_top.Store.Value.Tag.pp";"Git_top.Store.Hash.pp";"Git_top.Store.Reference.pp";"Git_top.Store.Inflate.pp"(* ; "Backend.Store.pp" *);"Git_top.Store.Path.pp";"Git_top.Store.pp_error"]leteval_string?(print_outcome=false)?(err_formatter=Format.err_formatter)str=letlexbuf=Lexing.from_stringstrinletphrase=!Toploop.parse_toplevel_phraselexbufinToploop.execute_phraseprint_outcomeerr_formatterphraseletrecinstall_printers=function|[]->true|printer::printers->letcmd=Printf.sprintf"#install_printer %s;;"printerineval_stringcmd&&install_printersprinterslet()=Printexc.record_backtracetruelet()=Fmt.set_style_rendererFmt.stderr`Ansi_ttylet()=Logs.set_reporter(Logs_fmt.reporter~dst:Fmt.stderr~pp_header:Logs_fmt.pp_header())let()=Logs.set_level~all:true(SomeLogs.Debug)