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