How big is a Git commit?

(ratfactor.com)

31 points | by theanonymousone 2 days ago

6 comments

  • nathanpankon 2 hours ago
    I played with making a git alternative that was streamlined according to workflow. I haven't completely abandoned it, but my core idea was that you can use ast path to compress the data further.

    Like you said git is really efficient, and even though I went in with some criticism because of the work(mess) that is chromium and the deep hacking I did there to fix stuff between versions without forcing a complete rebuild

    I came to the conclusion that as a compression alternative, my approach wasn't worth it. Git did a better job!

    Anyway here's the attempt: https://github.com/pankon/gat

    • Anduia 1 hour ago
      It is not public is it?
      • nathanpankon 57 minutes ago
        Good call, made it public :)

        Thanks!

  • cocoto 1 hour ago
    > The du options are: s to summarize and b to display bytes.

    Small nitpick: Use long options and your code samples become self explanatory!

    • NetOpWibby 1 hour ago
      I always use long options when possible. I don’t need terseness, computers do. I wanna help future me figure out how to run something.
  • CodesInChaos 36 minutes ago
    Does git support better compression algorithms than deflate, like zstd or brotli?
  • fiddlerwoaroof 3 hours ago
    It can get even smaller when loose objects get packed into packfiles because of delta compression: a whole bunch of identical files can be stored in minimal overhead over storing one copy.
    • gblargg 12 minutes ago
      Right, packfile size is really what matters in the long-term. A tiny change to a file in the short term just adds the whole thing again (compressed), whereas a tiny change in a packfile shouldn't add much at all. Unless you've got very limited disk space, the long-term is the only size that matters.
    • bewuethr 59 minutes ago
      I think the 250 files all containing just "foo" are stored as a single blob, too, even before creating a packfile.
      • fiddlerwoaroof 22 minutes ago
        I forgot about that, delta compression still can save quite a bit when you have nearly-identical files.
  • grumbelbart2 2 hours ago
    Did you do —apparent-size?
  • llj123 2 hours ago
    [dead]