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

Re: [PATCH] Add --no-reuse-delta option to git-gc

From
Nicolas Pitre <nico@cam.org>
Date
Jun 11, 2007, 14:01 UTC
Message-ID
<alpine.LFD.0.99.0706110930170.12885@xanadu.home>
In-Reply-To
<Pine.LNX.4.64.0706111109430.4059@racer.site>
On Mon, 11 Jun 2007, Johannes Schindelin wrote:
Show 28 quoted lines
> Hi,
> 
> On Sun, 10 Jun 2007, Nicolas Pitre wrote:
> 
> > On Sun, 10 Jun 2007, Sam Vilain wrote:
> > 
> > > Anyway it's a free world so be my guest to implement it, I guess if 
> > > this was selectable it would only be a minor annoyance waiting a bit 
> > > longer pulling from from some repositories, and it would be 
> > > interesting to see if it did make a big difference with pack file 
> > > sizes.
> > 
> > It won't happen for a simple reason: to be backward compatible with 
> > older GIT clients.  If you have your repo compressed with bzip2 and an 
> > old client pulls it then the server would have to decompress and 
> > recompress everything with gzip.  If instead your repo remains with gzip 
> > and a new client asks for bzip2 then you have to recompress as well 
> > (slow).  So in practice it is best to remain with a single compression 
> > method.
> 
> With the extension mechanism we have in place, the client can send what 
> kind of compression it supports, and the server can actually refuse to 
> send anything if it does not want to recompress.
> 
> What I am trying to say: you do not necessarily have to allow every client 
> to access that particular repository. I agree that mixed-compression repos 
> are evil, but nothing stands in the way of a flag allowing (or 
> disallowing) recompression in a different format when fetching.
I know.
But is it worthwhile?  I think not.

However I won't stand in the way of anyone who wants to try and provide numbers. I just don't believe this is worthwhile and am not inclined to do it.

OK... Well, I just performed a really quick test:

$ mkdir test-bzip2 $ mkdir test-gzip $ cp git/*.[cho] test-bzip2 $ cp git/*.[cho] test-gzip $ bzip2 test-bzip2/* $ gzip test-gzip/* $ du -s test-bzip2 test-gzip 5016 test-bzip2 4956 test-gzip

It is true that bzip2 is better with large files, but we typically have very few of them in a Git repo, and in the presence of large files bzip2 then becomes _much_ slower than gzip. So, given that the nature of Git objects are likely to be small in 98% of the cases due to deltas, it appears that bzip2 won't be a gain at all but rather a waste, making a poor case for supporting it forever afterwards.

> So if you should decide someday to track data with Git (remember: Generic 
> Information Tracker, not just source code),
Bah... if you please.
> that is particularly unfit for 
> compression with gzip, but that you _need_ to store in a different 
> compressed manner, you can set up a repository which will _only_ _ever_ 
> use that compression.

Maybe. But you'd better have a concrete data set and result numbers to convince me. Designing software for hypothetical situations before they actually exist leads to bloatware.

Nicolas
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 21 of 40 in “Add --no-reuse-delta, --window, and --depth options to git-gc”
  1. Add --no-reuse-delta, --window, and --depth options to git-gcTheodore Ts'o, May 8, 2007
  2. Nicolas PitreMay 8, 2007
  3. Theodore TsoMay 8, 2007
  4. Dana HowMay 8, 2007
  5. Junio C HamanoMay 8, 2007
  6. Theodore Ts'oMay 8, 2007
  7. Add pack.depth option to git-pack-objects and change default depth to 50Theodore Ts'o, May 8, 2007
  8. Add --no-reuse-delta option to git-gcTheodore Ts'o, May 8, 2007
  9. Nicolas PitreMay 8, 2007
  10. Daniel BarkalowMay 9, 2007
  11. Junio C HamanoMay 9, 2007
  12. Steven GrimmMay 9, 2007
  13. Johannes SchindelinMay 9, 2007
  14. Junio C HamanoMay 9, 2007
  15. Shawn O. PearceMay 9, 2007
  16. Sam VilainJun 10, 2007
  17. Nicolas PitreJun 11, 2007
  18. Steven GrimmJun 11, 2007
  19. Shawn O. PearceJun 11, 2007
  20. Johannes SchindelinJun 11, 2007
  21. Nicolas PitreJun 11, 2007
  22. Johannes SchindelinJun 11, 2007
  23. Add --aggressive option to 'git gc'Theodore Tso, May 9, 2007
  24. Junio C HamanoMay 9, 2007
  25. Theodore TsoMay 9, 2007
  26. Junio C HamanoMay 10, 2007
  27. Nicolas PitreMay 8, 2007
  28. Theodore TsoMay 8, 2007
  29. Johannes SchindelinMay 8, 2007
  30. Theodore TsoMay 8, 2007
  31. Nicolas PitreMay 8, 2007
  32. Theodore TsoMay 9, 2007
  33. Johannes SchindelinMay 9, 2007
  34. Dana HowMay 8, 2007
  35. Nicolas PitreMay 8, 2007
  36. Junio C HamanoMay 9, 2007
  37. Nicolas PitreMay 8, 2007
  38. Junio C HamanoMay 8, 2007
  39. Nicolas PitreMay 8, 2007
  40. Nicolas PitreMay 8, 2007

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.