git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tackling Git Limitations with Singular Large Line-seperated Plaintext files

From
Øyvind A. Holm <sunny@sunbase.org>
Date
Aug 10, 2014, 21:45 UTC
Message-ID
<CAA787rkoX=aEf3cs5LpPmKKOfKeAUQZ+3KqckofRjOfCaNP-+g@mail.gmail.com>
In-Reply-To
<53B15E64.9030005@gmail.com>
On 30 June 2014 14:56, Jakub Narębski <jnareb@gmail.com> wrote:
Show 19 quoted lines
> Linus Torvalds wrote:
> > .. even there, there's another issue. With enough memory, the diff
> > itself should be fairly reasonable to do, but we do not have any
> > sane *format* for diffing those kinds of things.
> >
> > The regular textual diff is line-based, and is not amenable to
> > comparing two long lines. You'll just get a diff that says "the two
> > really long lines are different".
> >
> > The binary diff option should work, but it is a horrible output
> > format, and not very helpful. It contains all the relevant data
> > ("copy this chunk from here to here"), but it's then shown in a
> > binary encoding that isn't really all that useful if you want to say
> > "what are the differences between these two chromosomes".
>
> There is also --word-diff[=<mode>] word-based textual diff, and I
> think one can abuse --word-diff-regex=<regex> for character-based
> diff... or maybe not, as <regex> specifies word characters, not words
> or word separators.
Yes, I have this alias defined:
  dww = diff --word-diff --word-diff-regex=.

It creates nice diffs on a character level. Sometimes specifying --patience to this helps.

-- Øyvind
Previous: Jakub Narębski
Message 10 of 10 in “Tackling Git Limitations with Singular Large Line-seperated Plaintext files”
  1. Jarrad HopeJun 27, 2014
  2. Shawn PearceJun 27, 2014
  3. Junio C HamanoJun 27, 2014
  4. Linus TorvaldsJun 27, 2014
  5. Linus TorvaldsJun 27, 2014
  6. Jason PyeronJun 27, 2014
  7. Linus TorvaldsJun 27, 2014
  8. Jarrad HopeJun 28, 2014
  9. Jakub NarębskiJun 30, 2014
  10. Øyvind A. HolmAug 10, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.