GitXplorerGitXplorer
j

patdiff

public
222 stars
19 forks
3 issues

Commits

List of commits on branch master.
Unverified
74b9c45d3efdf1a36b2e8afe7b2f25536d159782

v0.18~preview.130.05+548

ppublic-release committed 2 months ago
Unverified
d034e8e8a2caffaaf84ad81f757fe1ff18404f61

v0.18~preview.130.00+55

ppublic-release committed 3 months ago
Unverified
4c832515a38fb17baaa60cb93fa614fe3a05d623

v0.18~preview.129.42+498

ppublic-release committed 4 months ago
Unverified
b98116169cf844c8cef1a083a925f38975f40033

v0.17~preview.129.36+325

ppublic-release committed 5 months ago
Unverified
d397cfecf1c2d43271835231d755e2fcb02e8171

v0.17~preview.129.17+77

ppublic-release committed 8 months ago
Unverified
f39908b50fde2765f70bc93ad58fd3cf7dd48e66

v0.17~preview.129.17+77

ppublic-release committed 9 months ago

README

The README file for this repository.

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.