OCamlFormat diff tool
ocamlformat-diff is a tool that uses OCamlFormat to apply the same formatting to compared OCaml files, so that the formatting differences between the two files are not displayed.
The file comparison is then performed by any
The options' documentation is available through
--diff allows you to configure the diff command that is used to compare the formatted files. The default value is the vanilla
diff, but you can also use patdiff or any other similar comparison tool.
git diff, you have to edit your
.git configuration files on each project you want to use
.git/info/attributes file must contain:
*.ml diff=ocamlformat-diff *.mli diff=ocamlformat-diff *.mlt diff=ocamlformat-diff
.git/config file must contain:
[diff "ocamlformat-diff"] command = ocamlformat-diff --diff=patdiff
Here patdiff will be used to compare OCaml files, you can also omit the
--diff option to use the vanilla