git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Wincent Colaiuta <win@wincent.com>
To: Matthijs Kooijman <matthijs@stdin.nl>
Cc: git@vger.kernel.org, Thomas Rast <trast@student.ethz.ch>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: Understanding and improving --word-diff
Date: Mon, 8 Nov 2010 18:35:48 +0100	[thread overview]
Message-ID: <857393A7-596D-4848-A002-6AC06FF6B2EA@wincent.com> (raw)
In-Reply-To: <20101108151601.GF22067@login.drsnuggles.stderr.nl>

On 08/11/2010, at 16:16, Matthijs Kooijman wrote:

> Hi folks,
> 
> I recently discovered --word-diff (or rather, --color-words and found
> --word-diff when I started to hack on the git master version) and I had
> hoped it would make the unified diffs generated by git-diff more
> readable.

[snip]

> Inexact output
> --------------
> Secondly, the --word-diff output currently never displays any changes to
> the non-word (whitespace) parts of a file. This makes sense for the
> LaTeX case, but sometimes you might want to get exact diff output
> instead. At first glance this seems possible by specifiying a word-regex
> of "." or something similar (i.e., make sure that the word regex matches
> everything). But this is problematic for newlines. The documentation
> states that stuff gets silently ignored if a newline ends up inside a
> word. For the --word-diff=color format, this is probably a fixed
> limitation of the otput format: you can't give a color to a newline (or
> a space, for that matter).

[snip]

> Porcelain format
> ----------------
> Lastly, the "porcelain" word-diff format seems a bit weird to me. Is
> the format specified somewhere, or are there any programs that use it
> currently? I couldn't find any users inside the git.git tree itself?
> 
> Looking at the format itself, it's a bit unclear to me what the ~ lines
> mean exactly. Commit 882749, which introduced the format says the mean
> "newlines in the input", but I'm not sure if this means the old file,
> new file or both.

I posted along similar lines back in September:

  http://article.gmane.org/gmane.comp.version-control.git/156375

I found I couldn't really use the porcelain format due to information loss and ended up having to roll my own, parse the normal diff output and using that.

Cheers,
Wincent

  parent reply	other threads:[~2010-11-08 17:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 15:16 Understanding and improving --word-diff Matthijs Kooijman
2010-11-08 15:41 ` Matthieu Moy
2010-11-08 15:49   ` Matthijs Kooijman
2010-11-08 16:33   ` Thomas Rast
2010-11-08 17:35 ` Wincent Colaiuta [this message]
2010-11-08 19:22 ` Thomas Rast
2010-11-09 22:01 ` Jeff King
2010-11-10  0:05   ` Johannes Schindelin
2010-11-10  4:17     ` Jeff King
2010-11-18  6:40   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=857393A7-596D-4848-A002-6AC06FF6B2EA@wincent.com \
    --to=win@wincent.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=matthijs@stdin.nl \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).