{"id":1177,"date":"2020-05-24T21:04:26","date_gmt":"2020-05-25T05:04:26","guid":{"rendered":"https:\/\/accretiondisc.com\/blog\/?p=1177"},"modified":"2020-05-25T09:15:19","modified_gmt":"2020-05-25T17:15:19","slug":"diff-tools-redux","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2020\/05\/24\/diff-tools-redux\/","title":{"rendered":"Diff Tools, Redux"},"content":{"rendered":"\n<p>S<a href=\"https:\/\/accretiondisc.com\/blog\/2011\/09\/20\/diff-tools\/\">ome time ago<\/a>, I mentioned here how I like to use <code>colordiff<\/code>. Well, on a Mac I actually prefer Apple&#8217;s <em>FileMerge<\/em> GUI diff tool, which is is part of the <a href=\"https:\/\/developer.apple.com\/library\/archive\/technotes\/tn2339\/_index.html\">Xcode command line tools<\/a>, and accessible from the command line as <code>opendiff<\/code>.)<\/p>\n\n\n\n<p>I recently discovered <a href=\"https:\/\/github.com\/ynqa\/diffy\">diffy<\/a>, which is similar to <code>colordiff<\/code>, but offers a <code>-split<\/code> option that gives you the side-by-side effect of <code>opendiff<\/code>. <\/p>\n\n\n\n<p>Even more interesting to me, however, is <a href=\"https:\/\/github.com\/mookid\/diffr\">diffr<\/a>, which is a &#8220;diff postprocessor&#8221; that shows the differences within a specific line. You run <code>diff -u ... | diffr<\/code> to see what you want.<\/p>\n\n\n\n<p>Thousands of words worth of pictures:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"427\" height=\"257\" src=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-01-plain.png\" alt=\"\" class=\"wp-image-1186\" srcset=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-01-plain.png 427w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-01-plain-300x181.png 300w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><figcaption>plain old diff<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"243\" src=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-02-colordiff.png\" alt=\"\" class=\"wp-image-1187\" srcset=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-02-colordiff.png 441w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-02-colordiff-300x165.png 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><figcaption>colordiff (aliased to diff because duh)<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"356\" src=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-03-diffy.png\" alt=\"\" class=\"wp-image-1188\" srcset=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-03-diffy.png 832w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-03-diffy-300x128.png 300w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-03-diffy-768x329.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><figcaption>diffy -s split<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"385\" src=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-04-diffr.png\" alt=\"\" class=\"wp-image-1189\" srcset=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-04-diffr.png 609w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-04-diffr-300x190.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><figcaption>diff -u &#8230; | diffr<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"731\" src=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-05-opendiff.png\" alt=\"\" class=\"wp-image-1190\" srcset=\"https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-05-opendiff.png 797w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-05-opendiff-300x275.png 300w, https:\/\/accretiondisc.com\/blog\/wp-content\/uploads\/2020\/05\/scrap-diff-05-opendiff-768x704.png 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><figcaption>FileMerge, invoked from the command line<\/figcaption><\/figure>\n\n\n\n<p>Update: I appear to have been wrong. Evidently, opendiff is part of <a href=\"https:\/\/developer.apple.com\/xcode\/\">Xcode<\/a> proper, not the command line tools. Which means I won&#8217;t be using it in general, because it&#8217;s <a href=\"https:\/\/accretiondisc.com\/blog\/2019\/09\/24\/xcode-and-bandwidth-caps\/\">freaking huge<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago, I mentioned here how I like to use colordiff. Well, on a Mac I actually prefer Apple&#8217;s FileMerge GUI diff tool, which is is part of the Xcode command line tools, and accessible from the command line as opendiff.) I recently discovered diffy, which is similar to colordiff, but offers a -split [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52],"tags":[1101,1036,382,1102,1048,1100,1104,94],"class_list":["post-1177","post","type-post","status-publish","format-standard","hentry","category-technology","tag-colordiff","tag-comparison","tag-diff","tag-diffr","tag-filemerge","tag-merge","tag-opendiff","tag-software-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRqpr-iZ","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/1177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=1177"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/1177\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=1177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=1177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=1177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}