{"thread":{"id":"61996","subject":"git diff --word-diff misbehaving over paragraph breaks?","startedAt":"2024-08-22T19:08:42Z","lastAt":"2024-08-22T19:08:42Z","messageCount":1,"participants":["Willow Liquorice"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"501557","messageId":"f6ebc032-3a5a-4ec5-ab6a-160f26e9bb4e@howhill.com","threadId":"61996","inReplyTo":null,"subject":"git diff --word-diff misbehaving over paragraph breaks?","fromName":"Willow Liquorice","fromEmail":"willow@howhill.com","sentAt":"2024-08-22T19:00:56Z","receivedAt":"2024-08-22T19:08:42Z","isPatch":false,"sender":{"key":"willow@howhill.com","avatar":null},"body":"I'm having some trouble diffing revisions of the Jargon File at the word \nlevel, because the formatting seems to be confusing git diff \n--word-‍diff. The diffs produced are far from minimal, or word diffs for \nthat matter.\n\nI've attached a pair of files that produces non-minimal output. The \nentire first paragraph of the diff is rewritten in the diff despite the \nfact that it is nearly identical across revisions. The word diff can be \nmade sensible by removing the second blank line so that the term and \ndefinition are no longer in separate \"paragraphs\".\n\nThe behaviour persists whether I set the word regex to \n\"[[:punct:]]+|[[:alnum:]]+\" or use the default word regex.\n\nIMO this behaviour is aberrant: whitespace is whitespace regardless of \nwhether it constitutes a paragraph break or not. Is there a command line \noption, or specific way of phrasing the regex, that I'm missing, or is \nthis a bug?\n\n\t- Willow Liquorice\n\n\n   :Acme: n.  The canonical supplier of bizarre, elaborate,    and\nnon-functional gadgetry - where Rube Goldberg and Heath    Robinson\n(two cartoonists who specialized in elaborate    contraptions) shop.\nThe name has been humorously expanded as A (or    American) Company\nMaking Everything.  (In fact, Acme was a real    brand sold from Sears\nRoebuck catalogs in the early 1900s.)     Describing some X as an \"Acme\nX\" either means \"This is    {insanely great}\", or, more likely, \"This\nlooks {insanely    great} on paper, but in practice it's really easy to\nshoot yourself    in the foot with it.\"  Compare {pistol}.\n\n   This term, specially cherished by American hackers and explained\nhere for the benefit of our overseas brethren, comes from the    Warner\nBrothers' series of \"Roadrunner\" cartoons.  In these    cartoons, the\nfamished Wile E. Coyote was forever attempting to    catch up with,\ntrap, and eat the Roadrunner.  His attempts usually    involved one or\nmore high-technology Rube Goldberg devices -    rocket jetpacks,\ncatapults, magnetic traps, high-powered    slingshots, etc.  These were\nusually delivered in large cardboard    boxes, labeled prominently with\nthe Acme name.  These devices    invariably malfunctioned in improbable\nand violent ways.\n\n\n\n\n:Acme: n.\n\n   [from  Greek  akme  highest  point  of perfection or achievement] The\n   canonical supplier of bizarre, elaborate, and non-functional gadgetry\n   --  where  Rube  Goldberg  and  Heath  Robinson  (two cartoonists who\n   specialized  in  elaborate  contraptions)  shop.  The  name  has been\n   humorously expanded as A (or American) Company Making Everything. (In\n   fact,  Acme  was a real brand sold from Sears Roebuck catalogs in the\n   early  1900s.) Describing some X as an \"Acme X\" either means \"This is\n   {insanely  great}\",  or, more likely, \"This looks {insanely great} on\n   paper, but in practice it's really easy to shoot yourself in the foot\n   with it.\" Compare {pistol}.\n\n   This term, specially cherished by American hackers and explained here\n   for  the  benefit  of  our  overseas  brethren, comes from the Warner\n   Brothers'  series  of  \"Road-runner\" cartoons. In these cartoons, the\n   famished  Wile  E.  Coyote  was  forever attempting to catch up with,\n   trap,  and  eat the Road-runner. His attempts usually involved one or\n   more  high-technology  Rube  Goldberg  devices  --  rocket  jetpacks,\n   catapults,  magnetic  traps, high-powered slingshots, etc. These were\n   usually delivered in large wooden crates labeled prominently with the\n   Acme  name  -- which, probably not by coincidence, was the trade name\n   of  a  peg  bar  system  for  superimposing  animation  cels  used by\n   cartoonists  since  forever. Acme devices invariably malfunctioned in\n   improbable and violent ways.\n\n"}]}