Installs pre-commit hooks for OCaml projects that run dune fmt automatically
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Port monorepo to latest ocaml-wire (opam pin)

Migrate all consumers to the new wire API:
- wire.c library → wire.3d (Wire_c → Wire_3d)
- Wire.struct_/module_ → Wire.Everparse.struct_/module_
- Wire.Codec: record/|+/seal → Codec.v with Field.v and $
- Wire.bf_uint* → Wire.U8/U16/U16be/U32/U32be
- Wire.UInt32 → Wire.Private.UInt32
- Wire.cases → Wire.lookup, Wire.map now uses labeled args
- Wire.Codec.decode now returns result
- Add wire pin to root.opam.template

+16 -4
+16 -4
lib/precommit.ml
··· 408 408 [] 409 409 | Some git_root -> ( 410 410 Log.debug (fun m -> m "check_ai_attribution: git_root=%s" git_root); 411 - let repo = Git.Repository.open_repo ~fs:ctx.fs (Fpath.v git_root) in 411 + let repo = 412 + Eio.Switch.run @@ fun sw -> 413 + Git.Repository.open_repo ~sw ~fs:ctx.fs (Fpath.v git_root) 414 + in 412 415 let user_email = user_email ~fs:ctx.fs repo in 413 416 Log.debug (fun m -> 414 417 m "check_ai_attribution: git_root=%s user_email=%s" git_root ··· 439 442 match git_root ~cwd:ctx.cwd ~fs:ctx.fs dir with 440 443 | None -> None 441 444 | Some git_root -> 442 - let repo = Git.Repository.open_repo ~fs:ctx.fs (Fpath.v git_root) in 445 + let repo = 446 + Eio.Switch.run @@ fun sw -> 447 + Git.Repository.open_repo ~sw ~fs:ctx.fs (Fpath.v git_root) 448 + in 443 449 Git.Repository.current_branch repo 444 450 445 451 let backup_branch ctx dir = 446 452 match git_root ~cwd:ctx.cwd ~fs:ctx.fs dir with 447 453 | None -> Fmt.failwith "%s: No .git directory found" dir 448 454 | Some git_root -> 449 - let repo = Git.Repository.open_repo ~fs:ctx.fs (Fpath.v git_root) in 455 + let repo = 456 + Eio.Switch.run @@ fun sw -> 457 + Git.Repository.open_repo ~sw ~fs:ctx.fs (Fpath.v git_root) 458 + in 450 459 let branch = 451 460 match Git.Repository.current_branch repo with 452 461 | Some b -> b ··· 521 530 match git_root ~cwd:ctx.cwd ~fs:ctx.fs dir with 522 531 | None -> err_no_git_dir dir 523 532 | Some git_root -> ( 524 - let repo = Git.Repository.open_repo ~fs:ctx.fs (Fpath.v git_root) in 533 + let repo = 534 + Eio.Switch.run @@ fun sw -> 535 + Git.Repository.open_repo ~sw ~fs:ctx.fs (Fpath.v git_root) 536 + in 525 537 let user_email = user_email ~fs:ctx.fs repo in 526 538 match Git.Repository.head repo with 527 539 | None -> Ok 0