123456789101112131415161718192021222324252627282930letsrc=Logs.Src.create"git-unix.packed-refs"~doc:"logs git-unix's packed-refs event"moduleLog=(valLogs.src_logsrc:Logs.LOG)moduleUnix_scheduler=Carton.Make(structtype'at='aend)letscheduler=letopenUnix_schedulerin{Carton.bind=(funxf->f(prjx));Carton.return=(funx->injx)}letinput_lineic=matchStdlib.input_lineicwith|line->Unix_scheduler.inj(Someline)|exceptionEnd_of_file->Unix_scheduler.injNoneletload~of_hexdotgit=tryletic=open_in_binFpath.(to_string(dotgit/"packed-refs"))inletrs=Git.Reference.Packed.loadscheduler~input_line~of_hexicinclose_inic;Unix_scheduler.prjrswithexn->Log.debug(funm->m"Got an error when we tried to load the packed-refs: %S."(Printexc.to_stringexn));[]