git diff --word-diff misbehaving over paragraph breaks?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm having some trouble diffing revisions of the Jargon File at the word level, because the formatting seems to be confusing git diff --word-‍diff. The diffs produced are far from minimal, or word diffs for that matter.

I've attached a pair of files that produces non-minimal output. The entire first paragraph of the diff is rewritten in the diff despite the fact that it is nearly identical across revisions. The word diff can be made sensible by removing the second blank line so that the term and definition are no longer in separate "paragraphs".

The behaviour persists whether I set the word regex to "[[:punct:]]+|[[:alnum:]]+" or use the default word regex.

IMO this behaviour is aberrant: whitespace is whitespace regardless of whether it constitutes a paragraph break or not. Is there a command line option, or specific way of phrasing the regex, that I'm missing, or is this a bug?

	- Willow Liquorice
   :Acme: n.  The canonical supplier of bizarre, elaborate,    and
non-functional gadgetry - where Rube Goldberg and Heath    Robinson
(two cartoonists who specialized in elaborate    contraptions) shop.
The name has been humorously expanded as A (or    American) Company
Making Everything.  (In fact, Acme was a real    brand sold from Sears
Roebuck catalogs in the early 1900s.)     Describing some X as an "Acme
X" either means "This is    {insanely great}", or, more likely, "This
looks {insanely    great} on paper, but in practice it's really easy to
shoot yourself    in the foot with it."  Compare {pistol}.

   This term, specially cherished by American hackers and explained
here for the benefit of our overseas brethren, comes from the    Warner
Brothers' series of "Roadrunner" cartoons.  In these    cartoons, the
famished Wile E. Coyote was forever attempting to    catch up with,
trap, and eat the Roadrunner.  His attempts usually    involved one or
more high-technology Rube Goldberg devices -    rocket jetpacks,
catapults, magnetic traps, high-powered    slingshots, etc.  These were
usually delivered in large cardboard    boxes, labeled prominently with
the Acme name.  These devices    invariably malfunctioned in improbable
and violent ways.

:Acme: n.

   [from  Greek  akme  highest  point  of perfection or achievement] The
   canonical supplier of bizarre, elaborate, and non-functional gadgetry
   --  where  Rube  Goldberg  and  Heath  Robinson  (two cartoonists who
   specialized  in  elaborate  contraptions)  shop.  The  name  has been
   humorously expanded as A (or American) Company Making Everything. (In
   fact,  Acme  was a real brand sold from Sears Roebuck catalogs in the
   early  1900s.) Describing some X as an "Acme X" either means "This is
   {insanely  great}",  or, more likely, "This looks {insanely great} on
   paper, but in practice it's really easy to shoot yourself in the foot
   with it." Compare {pistol}.

   This term, specially cherished by American hackers and explained here
   for  the  benefit  of  our  overseas  brethren, comes from the Warner
   Brothers'  series  of  "Road-runner" cartoons. In these cartoons, the
   famished  Wile  E.  Coyote  was  forever attempting to catch up with,
   trap,  and  eat the Road-runner. His attempts usually involved one or
   more  high-technology  Rube  Goldberg  devices  --  rocket  jetpacks,
   catapults,  magnetic  traps, high-powered slingshots, etc. These were
   usually delivered in large wooden crates labeled prominently with the
   Acme  name  -- which, probably not by coincidence, was the trade name
   of  a  peg  bar  system  for  superimposing  animation  cels  used by
   cartoonists  since  forever. Acme devices invariably malfunctioned in
   improbable and violent ways.


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux