package merge-fmt
Git mergetool leveraging code formatters
Install
Dune Dependency
Authors
Maintainers
Sources
merge-fmt-0.2.tbz
sha256=c858a8480620c8f9a07c0476872b02cdc8457fef1041635a907509468b05604d
sha512=29f04667359810e90ac663d7f53b5545f82fd2122f4e6962be4718ae56dc520e2208e99d51ac422f87245a74de3e006fe00bdc37fceadc618260be3eec0733ed
README.md.html
Merge-fmt - git mergetool leveraging code formatters
WARNING: This tool is still experimental.
merge-fmt
is a small wrapper on top git commands to help resolve conflicts by leveraging code formatters.
merge-fmt
currently only knows about the following formatters:
ocamlformat for OCaml.
refmt for reason.
Note that supporting new code formatters is trivial.
Getting started
There are three ways to use merge-fmt.
Standalone
Just call merge-fmt
while there are unresolved conflicts. merge-fmt
will try resolve conflicts automatically.
As a Git mergetool
merge-fmt
can act as a git mergetool. First configure the current git repository with
merge-fmt setup-mergetool
git config --local mergetool.mergefmt.cmd 'merge-fmt mergetool --base=$BASE --current=$LOCAL --other=$REMOTE -o $MERGED'
git config --local mergetool.mergefmt.trustExitCode true
Then, use git mergetool
to resolve conflicts with git mergetool -t mergefmt
As a git merge driver
merge-fmt
can act as a git merge driver. Configure the current git repository to use merge-fmt as the default merge driver.
$ merge-fmt setup-merge
git config --local merge.mergefmt.name 'merge-fmt driver'
git config --local merge.mergefmt.driver 'merge-fmt mergetool --base=%O --current=%A --other=%B -o %A --name=%P'
git config --local merge.tool 'mergefmt'
git config --local merge.default 'mergefmt'
Install
$ opam pin add merge-fmt git@github.com:hhugo/merge-fmt.git
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>