package patdiff

All checked builds pass
  1. Overview
  2. Docs
File Diff using the Patience Diff algorithm

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=f4f2b060ea39870e238f5be744e84d1d8030864a02f8fc2368866e4d3d7e1b72

Description

Added to opam-repository:

README

Patdiff - colored patience diffs with word-level refinement

Patdiff is an OCaml implementation of Bram Cohen's patience diff algorithm, with a few extra conveniences for comparing code and config files:

outputs plain ASCII, ANSI color codes, or HTML

optional semantic diffing of numbers

screenshot

good word-level diffing out of the box

screenshot

And of course all the usual features:

  • recursive diffing of directories
  • extensively configurable output (markers, colors, location format, context)
  • whitespace-aware diffing

Installation

opam install patdiff

See here for Patdiff's opam package file.

Compiling from source

To build patdiff for local development, install its dependencies:

git clone https://github.com/janestreet/patdiff
cd patdiff
opam install --deps-only .

To compile, and optionally install, patdiff:

make
make install

Usage

patdiff old-file new-file

If you don't supply any arguments to patdiff, it will read diff-like text from stdin and color it in the normal patdiff way.

The file ~/.patdiff is used as a config file if it exists. You can write a sample config with the -make-config flag.

patdiff-git-wrapper

A simple wrapper is provided for using patdiff as git's "external diff" tool. You can enable it with:

export GIT_EXTERNAL_DIFF=$(command -v patdiff-git-wrapper)

or

git config --global diff.external $(command -v patdiff-git-wrapper)

Documentation

More docs, including detailed API docs, are available here.

Dependencies (9)

  1. re >= "1.8.0"
  2. dune >= "3.11.0"
  3. ppx_jane >= "v0.17" & < "v0.18~"
  4. patience_diff >= "v0.17" & < "v0.18~"
  5. expect_test_helpers_core >= "v0.17" & < "v0.18~"
  6. core_unix >= "v0.17" & < "v0.18~"
  7. core_kernel >= "v0.17" & < "v0.18~"
  8. core >= "v0.17" & < "v0.18~"
  9. ocaml >= "5.1.0"

Dev Dependencies

None

Optional Dependencies

None

Used by (4)

  1. bonsai >= "v0.17.0"
  2. dunolint
  3. neural_nets_lib >= "0.4.0" & < "0.5.2"
  4. osnap < "0.3.0"

Conflicts

None

Build status

Results of building patdiff 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.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
v0.17.0 (this version) n/a n/a good good good
v0.16.1 n/a good good n/a n/a
  • 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