Re: Understanding and improving --word-diff
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 10, 2010, 00:05 UTC
- Message-ID
- <alpine.DEB.1.00.1011100102540.2226@bonsai2>
- In-Reply-To
- <20101109220136.GA5617@sigill.intra.peff.net>
Hi,
On Tue, 9 Nov 2010, Jeff King wrote:
Show 20 quoted lines
> On Mon, Nov 08, 2010 at 04:16:01PM +0100, Matthijs Kooijman wrote:
>
> > E.g., I would like to see:
> >
> > -a <r>b</r> c
> > +a <g>x</g> c
> >
> > Unfortunately, all --word-diff types currently departs from line-based
> > - and + lines and show the new version of the file with the changed
> > words (both old and new versions) shown inline, marked with coloring
> > or {- ... -} kind of syntax. E.g., with --word-diff=color, the above
> > would look like:
> >
> > a <r>b</r><g>x</g> c
> >
> > Personally, I think that the first example above is easier to read
> > than the second one (at least for diffs of code).
>
> Yeah, as you figured out, word diff is really about formats that aren't
> line oriented.Not really correct. While the _current_ way to show word diffs is imitating GNU wdiff, the internal data structure does allow for more sophisticated output.
Ciao, Dscho
P.S.: Peff, I hope you're fine with me responding to the first sentence only. After all, you know that my attention span is 7.2 seconds.
Some people taught me to put a smiley after such a statement, so: ;-)