{"thread":{"id":"48287","subject":"Feature Request: Add diff.word-diff <mode> and perhaps diff.word-diff-regex <regex> configuration options to enable always using word-diffs in git diff","startedAt":"2018-04-14T20:03:00Z","lastAt":"2018-04-15T21:13:59Z","messageCount":3,"participants":["Doron Behar","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"344701","messageId":"20180414200227.b35bdkir6ygio5is@NUC.doronbehar.com","threadId":"48287","inReplyTo":null,"subject":"Feature Request: Add diff.word-diff <mode> and perhaps diff.word-diff-regex <regex> configuration options to enable always using word-diffs in git diff","fromName":"Doron Behar","fromEmail":"doron.behar@gmail.com","sentAt":"2018-04-14T20:02:27Z","receivedAt":"2018-04-14T20:03:00Z","isPatch":false,"sender":{"key":"doron.behar@gmail.com","avatar":null},"body":"I've just came across the wonderful command line option for `git diff`:\n`--word-diff`. It could be great to have a configuration option that\nwill enable this feature by default when running `git diff`.\n"},{"id":"344702","messageId":"87604tft6p.fsf@evledraar.gmail.com","threadId":"48287","inReplyTo":"20180414200227.b35bdkir6ygio5is@NUC.doronbehar.com","subject":"Re: Feature Request: Add diff.word-diff <mode> and perhaps diff.word-diff-regex <regex> configuration options to enable always using word-diffs in git diff","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-04-14T20:07:26Z","receivedAt":"2018-04-14T20:07:33Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sat, Apr 14 2018, Doron Behar wrote:\n\n> I've just came across the wonderful command line option for `git diff`:\n> `--word-diff`. It could be great to have a configuration option that\n> will enable this feature by default when running `git diff`.\n\nDo you know you can do:\n\n    git config --global alias.wdiff \"diff --word-diff\"\n\n?\n"},{"id":"344755","messageId":"xmqqbmek18bz.fsf@gitster-ct.c.googlers.com","threadId":"48287","inReplyTo":"87604tft6p.fsf@evledraar.gmail.com","subject":"Re: Feature Request: Add diff.word-diff <mode> and perhaps diff.word-diff-regex <regex> configuration options to enable always using word-diffs in git diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-04-15T21:13:52Z","receivedAt":"2018-04-15T21:13:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Sat, Apr 14 2018, Doron Behar wrote:\n>\n>> I've just came across the wonderful command line option for `git diff`:\n>> `--word-diff`. It could be great to have a configuration option that\n>> will enable this feature by default when running `git diff`.\n>\n> Do you know you can do:\n>\n>     git config --global alias.wdiff \"diff --word-diff\"\n\nCorrect, but it is a \"you could instead do it this way\" that is not\naccompanied by a \"you do not want to do what you said you want to\nbecause..\" answer.  Having the latter is often helpful to learn why\nthe suggestion is actually not a mere \"you could\" but is a \"you are\nbetter off doing it this way\".\n\nEven though it is discouraged, people script using the Porcelain\n\"git diff\" command, and once users of such a configuration variable\nis used in Doron's fork of Git, those scripts will break for them.\n\nUsing alias like you showed won't have such a problem.\n"}]}