Last night I went to a coding party at a friend's house. I was on my laptop, and so didn't have any of my regular projects with me, so instead I spent some time figuring out some code for another person at the party.
The code in question was the implementation of Patience Diff, a diffing algorithm written by Bram Cohen of Bittorrent fame, and used
(
Read more... )
Comments 7
You should write more often :-)
Reply
Reply
i can imagine what the effect is, but perhaps a nice standard-diff vs patience-diff at the end of this article would have been cool!
i really hated the standard diff when i had to resolve multiple function renaming and moved conflicts of similiar functions!
i wish i had that patience-diff back then ... (this unique-common-line thing is really a great idea!)
Reply
Reply
aaaaaa
aaaaaa
bbbbbb
bbbbbb
cccccc
cccccc
abc
file b
abc
aaaaaa
aaaaaa
bbbbbb
bbbbbb
cccccc
cccccc
would the matching result be
-aaaaaa
-aaaaaa
-bbbbbb
-bbbbbb
-cccccc
-cccccc
abc
+aaaaaa
+aaaaaa
+bbbbbb
+bbbbbb
+cccccc
+cccccc
Reply
git diff --patience HEAD HEAD^
diff --git a/a.txt b/a.txt
index accc3bd..3299d68 100644
--- a/a.txt
+++ b/a.txt
@@ -1,7 +1,7 @@
+aaaaaa
+aaaaaa
+bbbbbb
+bbbbbb
+cccccc
+cccccc
abc
-aaaaaa
-aaaaaa
-bbbbbb
-bbbbbb
-cccccc
-cccccc
Reply
Reply
Leave a comment