package merge-fmt

Build not checked
  1. Overview
  2. Docs
Git mergetool leveraging code formatters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

merge-fmt-0.3.tbz
sha256=17e76cd13a1670a0f8349537c984955b80779b62c19e147ee105530ceefdab5e
sha512=66f56ae2d888fa6997754bbcee71a19d65fb51abf4b5b6240a252795cc0866487ad87199c79b699ff84f7150ee5dcc76dad3f427e94d25172fd4a5967c9c23aa

Description

merge-fmt is a small wrapper on top git commands to help resolve conflicts by leveraging code formatters.

Added to opam-repository:

README

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:

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

Dependencies (5)

  1. stdio
  2. base < "v0.17"
  3. cmdliner >= "1.1.0"
  4. dune >= "1.6"
  5. ocaml >= "4.06.1"

Dev Dependencies (3)

  1. ocamlformat = "0.24.1" & with-test
  2. core_unix with-test
  3. ppx_expect with-test

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building merge-fmt with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.4 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure