BeniBela online

Summary

README.md:

Simplify diff

Little tool to simplify unified diffs, e.g. to remove lines only containing whitespace changes

Installation

My homepages provides standalone simplify diff binaries for Windows and Linux.

If you want to compile it, you need Lazarus and my rcmdline unit. Then just open simplifydiff.lpi in Lazarus and click compile.

Usage

It is a commandline program, so you can simply call it with:

simplifydiff < broken.diff > improved.diff

simplifydiff --help prints more advanced option.

Example

A too verbose diff like:

Index: smallUsefulFunctions.cpp
===================================================================
--- smallUsefulFunctions.cpp    (revision 113)
+++ smallUsefulFunctions.cpp    (working copy)
@@ -1,6 +1,6 @@
 abc
-old
-equal
-more equal
-even more equal
-even even more equal
+new
+equal
+more equal
+even more equal
+even even more equal

is simplified to

Index: smallUsefulFunctions.cpp
===================================================================
--- smallUsefulFunctions.cpp    (revision 113)
+++ smallUsefulFunctions.cpp    (working copy)
@@ -1,5 +1,5 @@
 abc
-old
+new
 equal
 more equal
 even more equal


How to clone

You can clone this repository with
hg clone http://hg.benibela.de/simplify-diff/


directory / @ :58617c55739c

name size permissions
[up] drwxr-xr-x
dir. components/ drwxr-xr-x
file README.md 1390 -rw-r--r--
file _hg.filemap 142 -rw-r--r--
file manage.sh 210 -rwxr-xr-x
file simplifydiff.lpi 10759 -rw-r--r--
file simplifydiff.pas 2414 -rw-r--r--
file test1.in 973 -rw-r--r--
file test1.out 45 -rw-r--r--
file test2.in 1536 -rw-r--r--
file test2.out 236 -rw-r--r--
file test3.in 383 -rw-r--r--
file test3.out 318 -rw-r--r--
file test4.in 275 -rw-r--r--
file test4.out 255 -rw-r--r--