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
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 27, 2014, 19:47 UTC
Message-ID
<CA+55aFwFne6gj6P_Vm+uGffbF--vd-yke0899k==iVgHkb+gWQ@mail.gmail.com>
In-Reply-To
<CA+55aFx6vFyZvpyQot_3Ym7wsCZ06abjNx_hEKkza-N856jMnw@mail.gmail.com>

On Fri, Jun 27, 2014 at 12:38 PM, Linus Torvalds <torvalds@linux-foundation.org> 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
Previous: Linus TorvaldsNext: Jason Pyeron
Message 5 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.