{"id":120,"date":"2007-03-16T21:55:44","date_gmt":"2007-03-16T19:55:44","guid":{"rendered":"http:\/\/web.glandium.org\/blog\/?p=120"},"modified":"2010-01-27T08:52:34","modified_gmt":"2010-01-27T07:52:34","slug":"diffing","status":"publish","type":"post","link":"https:\/\/glandium.org\/blog\/?p=120","title":{"rendered":"diffing"},"content":{"rendered":"<p>I always assumed the diff algorithm to be quite standard and used anywhere there is a diff function, well it seems it is not, and it also seems that human readability is very dependent on the tool you use:<\/p>\n<p>Here is what diff -u, git diff and tla diff give:<\/p>\n<blockquote>\n<pre>@@ -42,10 +42,9 @@\r\n \r\n include $(DEPTH)\/config\/autoconf.mk\r\n \r\n-include $(topsrcdir)\/config\/rules.mk\r\n+EXTRA_COMPONENTS = nsKillAll.js\r\n \r\n-libs::\r\n-       $(INSTALL) $(srcdir)\/nsKillAll.js $(DIST)\/bin\/components\r\n+include $(topsrcdir)\/config\/rules.mk\r\n \r\n clean::\r\n        rm -f $(DIST)\/bin\/components\/nsKillAll.js\r\n<\/pre>\n<\/blockquote>\n<p>This is the least human readable output. In comparison, svn diff, svk diff and bzr diff do output:<\/p>\n<blockquote>\n<pre>@@ -42,11 +42,10 @@\r\n \r\n include $(DEPTH)\/config\/autoconf.mk\r\n \r\n+EXTRA_COMPONENTS = nsKillAll.js\r\n+\r\n include $(topsrcdir)\/config\/rules.mk\r\n \r\n-libs::\r\n-       $(INSTALL) $(srcdir)\/nsKillAll.js $(DIST)\/bin\/components\r\n-\r\n clean::\r\n        rm -f $(DIST)\/bin\/components\/nsKillAll.js\r\n \r\n<\/pre>\n<\/blockquote>\n<p>Mercurial outputs:<\/p>\n<blockquote>\n<pre>@@ -42,10 +42,9 @@\r\n \r\n include $(DEPTH)\/config\/autoconf.mk\r\n \r\n+EXTRA_COMPONENTS = nsKillAll.js\r\n+\r\n include $(topsrcdir)\/config\/rules.mk\r\n-\r\n-libs::\r\n-       $(INSTALL) $(srcdir)\/nsKillAll.js $(DIST)\/bin\/components\r\n \r\n clean::\r\n        rm -f $(DIST)\/bin\/components\/nsKillAll.js\r\n\r\n<\/pre>\n<\/blockquote>\n<p>which is pretty similar.<\/p>\n<p>I got too fed up with tla and baz to try more (and didn't even go up to committing a file in baz, so there's no diff result for it)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I always assumed the diff algorithm to be quite standard and used anywhere there is a diff function, well it seems it is not, and it also seems that human readability is very dependent on the tool you use: Here is what diff -u, git diff and tla diff give: @@ -42,10 +42,9 @@ include [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,5],"tags":[23],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-misc","category-pdo","tag-en"],"_links":{"self":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=120"}],"version-history":[{"count":1,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":738,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/120\/revisions\/738"}],"wp:attachment":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}