diff icon indicating copy to clipboard operation
diff copied to clipboard

Go implementation of patience diff, LCS, and merge

diff GoDoc

Go implementation of patience diff, LCS, and merge

go get github.com/ktravis/diff

Patience diff was developed by Bram Cohen, see here and here for explanations. The diffs produced are generally more human-readable, i.e.,

the patience diff:

 void func1() {
     x += 1
 }

+void functhreehalves() {
+    x += 1.5
+}
+
 void func2() {
     x += 2
 }

vs the traditional LCS-based diff:

 void func1() {
     x += 1
+}
+
+void functhreehalves() {
+    x += 1.5
 }
 
 void func2() {
     x += 2
 }