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

Re: Fw: Curiosity

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 16, 2021, 02:19 UTC
Message-ID
<YbqiQ1B9ezF/RPOn@camp.crustytoothpaste.net>
In-Reply-To
<xmqq8rwl91yf.fsf@gitster.g>
On 2021-12-15 at 18:07:20, Junio C Hamano wrote:
Show 17 quoted lines
> João Victor Bonfim  <JoaoVictorBonfim@protonmail.com> writes:
> > Since Git is almost used for everything at this point, is there
> > any intent on providing better support for non textual file types?
> > Why do I say this? Take this game mod which I follow as example ->
> > https://github.com/SolariusScorch/XComFiles <- whenever I clone it
> > Git takes a significant forever amount of time to download 452 MB
> > of files whose some part, from my perspective, isn't being delta
> > compressed like the text files are (since, whenever reading a log
> > of what changes were made, git creates and undoes modes for all
> > binary files, some of which only changed by a pixel from one
> > colour to another).
> 
> Our delta compression does not care whether the contents are text or
> binary, so if it is not compressed well, so it can be a sign that
> the contents are not compressible to begin with, at least with the
> xdelta binary-diff-patch engine we use.  Improvement designs,
> algorithms and patches are always welcome ;-)

To expand on this, if what you're storing is already compressed, like Ogg Vorbis files or PNGs, like are found in that repository, then generally they will not delta well. This is also true of things like Microsoft Office or OpenOffice documents, because they're essentially Zip files.

The delta algorithm looks for similarities between files to compress them. If a file is already compressed using something like Deflate, used in PNGs and Zip files, then even very similar files will generally look very different, so deltification will generally be ineffective.

There are two main solutions to this. One is to store your data uncompressed in the repository and compress it as part of a build step. This makes your checkouts larger, but it makes your repository smaller.

The other is to store them outside of the repository proper. Some folks use Git LFS for this, but you could also just store a manifest with file names and secure hashes, plus a download location for a public server.

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: João Victor BonfimNext: João Victor Bonfim
Message 4 of 14 in “Fw: Curiosity”
  1. João Victor BonfimDec 15, 2021
  2. Junio C HamanoDec 15, 2021
  3. João Victor BonfimDec 15, 2021
  4. brian m. carlsonDec 16, 2021
  5. João Victor BonfimDec 16, 2021
  6. Martin FickDec 16, 2021
  7. Junio C HamanoDec 16, 2021
  8. João Victor BonfimDec 18, 2021
  9. João Victor BonfimDec 18, 2021
  10. Junio C HamanoDec 18, 2021
  11. João Victor BonfimDec 18, 2021
  12. Martin FickDec 18, 2021
  13. brian m. carlsonDec 18, 2021
  14. João Victor BonfimDec 18, 2021

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.