Thread (8 messages) flat view 8 messages, 6 authors, 2016-06-15

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

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 23:01:45

On Fri, Jun 27, 2014 at 12:38 PM, Linus Torvalds
[off-list ref] wrote:
I think it might be possible to just specify a special diff algorithm
(git already supports that, obviously), and just introduce a new "use
binary diffs with a textual representation" model.
Another model would be to just insert newlines in the data, and use
the regular textual diff on that "preprocessed" format.

The problem of *where* to insert the newlines is somewhat interesting,
since the stupid approaches ("chunk it up in 64-byte lines") don't
work with data insertion/deletion (all the lines will now be different
just because the data is offset), but there are algorithms that handle
that reasonably well, like breaking lines at certain well-defined
patterns (the patterns can then be defined either explicitly or
algorithmically - like calculating a hash/crc over the last rolling N
characters and breaking if the result  matches some modulo
calculation).

                Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help