{"thread":{"id":"31374","subject":"diff/merge tool that ignores whitespace changes","startedAt":"2012-08-28T16:26:39Z","lastAt":"2012-09-03T20:40:22Z","messageCount":9,"participants":["Enrico Weigelt","Stephen Bash","Matthew Caron","Torsten Bögershausen","Andreas Schwab","Jonas Fonseca"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"197992","messageId":"12945e4d-6a76-4c5d-a4ee-132552a5da4d@zcs","threadId":"31374","inReplyTo":"c58cfa61-84c0-4bbe-80a6-59f156317007@zcs","subject":"diff/merge tool that ignores whitespace changes","fromName":"Enrico Weigelt","fromEmail":"enrico.weigelt@vnc.biz","sentAt":"2012-08-28T16:26:39Z","receivedAt":"2012-08-28T16:26:39Z","isPatch":false,"sender":{"key":"enrico.weigelt@vnc.biz","avatar":"https://gravatar.com/avatar/15479654ea5be5109582e0713a8ab4bb258846099c516dd320dc686ef70a8a3e?d=mp&s=160"},"body":"Hi folks,\n\nI'm looking for a diff / merge tool that treats lines with\nonly whitespace changes (trailing or leading whitespaces,\nlinefeeds, etc) as equal.\n\nThe goal is to make reviews as well as merging or rebasing\neasier when things like indentions often change.\n\nDoes anybody know an solution for that ?\n\n\nthx\n-- \nMit freundlichen Grüßen / Kind regards \n\nEnrico Weigelt \nVNC - Virtual Network Consult GmbH \nHead Of Development \n\nPariser Platz 4a, D-10117 Berlin\nTel.: +49 (30) 3464615-20\nFax: +49 (30) 3464615-59\n\nenrico.weigelt@vnc.biz; www.vnc.de \n"},{"id":"197994","messageId":"1679275990.100371.1346175639379.JavaMail.root@genarts.com","threadId":"31374","inReplyTo":"12945e4d-6a76-4c5d-a4ee-132552a5da4d@zcs","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2012-08-28T17:40:39Z","receivedAt":"2012-08-28T17:40:39Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"----- Original Message -----\n> From: \"Enrico Weigelt\" <enrico.weigelt@vnc.biz>\n> Sent: Tuesday, August 28, 2012 12:26:39 PM\n> Subject: diff/merge tool that ignores whitespace changes\n> \n> I'm looking for a diff / merge tool that treats lines with\n> only whitespace changes (trailing or leading whitespaces,\n> linefeeds, etc) as equal.\n> \n> The goal is to make reviews as well as merging or rebasing\n> easier when things like indentions often change.\n> \n> Does anybody know an solution for that ?\n\nI use kdiff3 which has the option to ignore whitespace changes (bonus: I can use it on all three major OSes as my work requires).  It's GUI based, so that could be considered a downside to some.\n\nI usually use a combination of Git's built-in diff and kdiff to check my work.\n\nHTH,\nStephen\n"},{"id":"197995","messageId":"503D02DF.3030802@redlion.net","threadId":"31374","inReplyTo":"1679275990.100371.1346175639379.JavaMail.root@genarts.com","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Matthew Caron","fromEmail":"matt.caron@redlion.net","sentAt":"2012-08-28T17:41:51Z","receivedAt":"2012-08-28T17:41:51Z","isPatch":false,"sender":{"key":"matt.caron@redlion.net","avatar":null},"body":"On 08/28/2012 01:40 PM, Stephen Bash wrote:\n> ----- Original Message -----\n>> From: \"Enrico Weigelt\" <enrico.weigelt@vnc.biz>\n>> Sent: Tuesday, August 28, 2012 12:26:39 PM\n>> Subject: diff/merge tool that ignores whitespace changes\n>>\n>> I'm looking for a diff / merge tool that treats lines with\n>> only whitespace changes (trailing or leading whitespaces,\n>> linefeeds, etc) as equal.\n>>\n>> The goal is to make reviews as well as merging or rebasing\n>> easier when things like indentions often change.\n>>\n>> Does anybody know an solution for that ?\n\nI'm fond of Meld.\n\n-- \nMatthew Caron, Software Build Engineer\nSixnet, a Red Lion business | www.sixnet.com\n+1 (518) 877-5173 x138 office\n"},{"id":"198007","messageId":"1897335562.100848.1346177294831.JavaMail.root@genarts.com","threadId":"31374","inReplyTo":"503D02DF.3030802@redlion.net","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2012-08-28T18:08:14Z","receivedAt":"2012-08-28T18:08:14Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"\n----- Original Message -----\n> From: \"Matthew Caron\" <Matt.Caron@redlion.net>\n> Sent: Tuesday, August 28, 2012 1:41:51 PM\n> Subject: Re: diff/merge tool that ignores whitespace changes\n> \n> > > I'm looking for a diff / merge tool that treats lines with only\n> > > whitespace changes (trailing or leading whitespaces, linefeeds,\n> > > etc) as equal.\n> > >\n> > > The goal is to make reviews as well as merging or rebasing easier\n> > > when things like indentions often change.\n> > >\n> > > Does anybody know an solution for that ?\n> \n> I'm fond of Meld.\n\nI loved Meld when I was working exclusively on Linux several years ago.  Honestly I think I set up my kdiff fonts/highlight colors/etc. to be very Meld-like (unintentionally, just what \"looked right\").  Looking at the website, technically Meld should build/run on a variety of OSes, but at some point (lost to the sands of time) I ran into trouble which is why I switched.\n\nStephen\n"},{"id":"198207","messageId":"fab86cd5-e3cf-4ddf-aa00-aafe44e8ce8c@zcs","threadId":"31374","inReplyTo":"1679275990.100371.1346175639379.JavaMail.root@genarts.com","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Enrico Weigelt","fromEmail":"enrico.weigelt@vnc.biz","sentAt":"2012-09-01T20:11:13Z","receivedAt":"2012-09-01T20:11:13Z","isPatch":false,"sender":{"key":"enrico.weigelt@vnc.biz","avatar":"https://gravatar.com/avatar/15479654ea5be5109582e0713a8ab4bb258846099c516dd320dc686ef70a8a3e?d=mp&s=160"},"body":"\n<snip>\n\nThanks folks, but that doesn't solve my problem. I'm looking for something\nthat's usable on command line or in scripts.\n\nUsecase a)\n\n* git-diff or git-format-patch or tig should not show differences\n  that are only whitespace changes (eg. differing linefeeds or\n  tabs vs. spaces, changed indentions, etc)\n\nUsecase b)\n\n* when doing merges or rebases, changes in whitespaces only should be\n  either ignored or resolved fully automtically.\n* For example:\n  -> A changes spaces into tabs or adds leading/trailing spaces\n  -> B changes some non-spaces \n\ncu\n-- \nMit freundlichen Grüßen / Kind regards \n\nEnrico Weigelt \nVNC - Virtual Network Consult GmbH \nHead Of Development \n\nPariser Platz 4a, D-10117 Berlin\nTel.: +49 (30) 3464615-20\nFax: +49 (30) 3464615-59\n\nenrico.weigelt@vnc.biz; www.vnc.de \n"},{"id":"198208","messageId":"504272F0.3070701@web.de","threadId":"31374","inReplyTo":"fab86cd5-e3cf-4ddf-aa00-aafe44e8ce8c@zcs","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-09-01T20:41:20Z","receivedAt":"2012-09-01T20:41:20Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 01.09.12 22:11, Enrico Weigelt wrote:\n> \n> <snip>\n> \n> Thanks folks, but that doesn't solve my problem. I'm looking for something\n> that's usable on command line or in scripts.\n> \n> Usecase a)\n> \n> * git-diff or git-format-patch or tig should not show differences\n>   that are only whitespace changes (eg. differing linefeeds or\n>   tabs vs. spaces, changed indentions, etc)\n\nWould that help ?\ngit help diff\n[snip]\n     --ignore-space-at-eol\n           Ignore changes in whitespace at EOL.\n\n       -b, --ignore-space-change\n           Ignore changes in amount of whitespace. This ignores whitespace at\n           line end, and considers all other sequences of one or more\n           whitespace characters to be equivalent.\n\n       -w, --ignore-all-space\n           Ignore whitespace when comparing lines. This ignores differences\n           even if one line has whitespace where the other line has none.\n"},{"id":"198209","messageId":"m2627xwiuk.fsf@igel.home","threadId":"31374","inReplyTo":"fab86cd5-e3cf-4ddf-aa00-aafe44e8ce8c@zcs","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-01T21:09:39Z","receivedAt":"2012-09-01T21:09:39Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Enrico Weigelt <enrico.weigelt@vnc.biz> writes:\n\n> * git-diff or git-format-patch or tig should not show differences\n>   that are only whitespace changes (eg. differing linefeeds or\n>   tabs vs. spaces, changed indentions, etc)\n\n--ignore-all-space\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"198235","messageId":"4eab55d2-b504-4c66-84be-c1ffe4edf94c@zcs","threadId":"31374","inReplyTo":"504272F0.3070701@web.de","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Enrico Weigelt","fromEmail":"enrico.weigelt@vnc.biz","sentAt":"2012-09-02T21:07:34Z","receivedAt":"2012-09-02T21:07:34Z","isPatch":false,"sender":{"key":"enrico.weigelt@vnc.biz","avatar":"https://gravatar.com/avatar/15479654ea5be5109582e0713a8ab4bb258846099c516dd320dc686ef70a8a3e?d=mp&s=160"},"body":"Hi,\n\n> Would that help ?\n> git help diff\n> [snip]\n>      --ignore-space-at-eol\n>            Ignore changes in whitespace at EOL.\n> \n>        -b, --ignore-space-change\n>            Ignore changes in amount of whitespace. This ignores\n>            whitespace at\n>            line end, and considers all other sequences of one or more\n>            whitespace characters to be equivalent.\n> \n>        -w, --ignore-all-space\n>            Ignore whitespace when comparing lines. This ignores\n>            differences\n>            even if one line has whitespace where the other line has\n>            none.\n\nThat might be it :)\nNow I yet need to find out how to configure tig for it.\n\nBy the way: anything similar for merge/rebase ?\n\n\nthx\n-- \nMit freundlichen Grüßen / Kind regards \n\nEnrico Weigelt \nVNC - Virtual Network Consult GmbH \nHead Of Development \n\nPariser Platz 4a, D-10117 Berlin\nTel.: +49 (30) 3464615-20\nFax: +49 (30) 3464615-59\n\nenrico.weigelt@vnc.biz; www.vnc.de \n"},{"id":"198270","messageId":"CAFuPQ1LrousHH9uK7zSeVvNrYwBBBpZwbM-fwgM_iDwWuqTMXg@mail.gmail.com","threadId":"31374","inReplyTo":"4eab55d2-b504-4c66-84be-c1ffe4edf94c@zcs","subject":"Re: diff/merge tool that ignores whitespace changes","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2012-09-03T20:40:22Z","receivedAt":"2012-09-03T20:40:22Z","isPatch":false,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"On Sun, Sep 2, 2012 at 5:07 PM, Enrico Weigelt <enrico.weigelt@vnc.biz> wrote:\n> Hi,\n>\n>> Would that help ?\n>> git help diff\n>> [snip]\n>>      --ignore-space-at-eol\n>>            Ignore changes in whitespace at EOL.\n>>\n>>        -b, --ignore-space-change\n>>            Ignore changes in amount of whitespace. This ignores\n>>            whitespace at\n>>            line end, and considers all other sequences of one or more\n>>            whitespace characters to be equivalent.\n>>\n>>        -w, --ignore-all-space\n>>            Ignore whitespace when comparing lines. This ignores\n>>            differences\n>>            even if one line has whitespace where the other line has\n>>            none.\n>\n> Now I yet need to find out how to configure tig for it.\n\nTry: echo \"set ignore-space = all\" >> ~/.tigrc\nAnd use 'W' to toggle between the different modes.\n\n-- \nJonas Fonseca\n"}]}