8 comments

  • cocoto5 hours ago
    &gt; The du options are: s to summarize and b to display bytes.<p>Small nitpick: Use long options and your code samples become self explanatory!
    • zetanor1 hour ago
      On the flip side, not everyone uses GNU coreutils (though I do on every machine that runs Git), and I wouldn&#x27;t have been confident that &quot;du -c&quot; and &quot;du --total&quot; are fully interchangeable prior to reading the manual just now. For Git, he could have confidently used &quot;git --message&quot; instead of &quot;git -m&quot;, but then again, I&#x27;m sure it would have surprised many Git users (&quot;is that -m?&quot;).
    • analog_daddy3 hours ago
      This is one of my biggest pet peeves! I hate reading shell scripts which uses small options. It is okay to use short options when interactively using shell, but there is no excuse to not spend time and try converting a small options shell script to use long options if its going to be read by someone else, especially if you anyway have to write comments explaining it. The biggest part i hate is that, some utilities don’t have long option counterpart!
    • NetOpWibby5 hours 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.
  • nathanpankon6 hours ago
    I played with making a git alternative that was streamlined according to workflow. I haven&#x27;t completely abandoned it, but my core idea was that you can use ast path to compress the data further.<p>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<p>I came to the conclusion that as a compression alternative, my approach wasn&#x27;t worth it. Git did a better job!<p>Anyway here&#x27;s the attempt: <a href="https:&#x2F;&#x2F;github.com&#x2F;pankon&#x2F;gat" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pankon&#x2F;gat</a>
    • Anduia2 hours ago
      Very interesting! Maybe the AST part is more useful for diffs and merges than for compression.
      • nathanpankon36 minutes ago
        There are some attempts at this (semanticdiff, etc) and they seem very good. But I was looking for a tool that could actively edit a set portion of code, maintaining a small diff above a moving target<p>In that case merging from &quot;main&quot; starts to be extremely difficult
    • Anduia5 hours ago
      It is not public is it?
      • nathanpankon5 hours ago
        Good call, made it public :)<p>Thanks!
  • jamesblonde2 hours ago
    Git was designed with assumptions about local file storage which make it challenge when storing data in a distributed file system. We built our distributed filesystem, HopsFS, to store data in S3. To support high performance git in FUSE, our writes hit remote NVMe disk(s) and asynchronously sync to S3 (you can replicate on NVMes or just do failure recovery). Previously, we used remote NVMe disks as a write-through cache, but that doesn&#x27;t work with git, S3 latency is too high.
    • EngineeringStuf1 hour ago
      We built similar at Swarmfile, and it&#x27;s compatible with Git too
  • CodesInChaos4 hours ago
    Does git support better compression algorithms than deflate, like zstd or brotli?
    • masklinn3 hours ago
      No. You can configure the compression level but that&#x27;s at far as it goes.<p>You can configure loose object and pack compression separately (core.compression and pack.compression) so loose object compression could be switched to an other algorithm as it&#x27;s completely local[1] (likely a low-compression zstd), but pack files are part of the network exchange, so things are a bit more complicated there. Also an annoyance there is that git uses raw zlib there is no identifying header or anything.<p>There are old threads on the mailing list, as well as a gitlab issue.<p>Although you can also tune compression per pack when you create them explicitly, on $DAYJOB&#x27;s repository in order to speed up gc some I have .keep packs which segregate images uncompressed in their own packs, because there&#x27;s little point wasting cycles on zlib-compressing jpegs and pngs.<p>[1]: unless you&#x27;re using the &quot;dumb http&quot; protocol, or performing (n)fs-mediated clones
      • CodesInChaos2 hours ago
        I&#x27;m a bit surprised Github or some other big git hoster didn&#x27;t push for such a protocol improvement. Since I assume that smaller and cheaper to create packs would reduce their costs noticeably.
  • fiddlerwoaroof7 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.
    • gblargg4 hours 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&#x27;t add much at all. Unless you&#x27;ve got very limited disk space, the long-term is the only size that matters.
      • masklinn3 hours ago
        &gt; whereas a tiny change in a packfile shouldn&#x27;t add much at all<p>Well to the extent that git is able to find a suitable delta, which is the difficult part.
    • bewuethr5 hours ago
      I think the 250 files all containing just &quot;foo&quot; are stored as a single blob, too, even before creating a packfile.
      • fiddlerwoaroof4 hours ago
        I forgot about that, delta compression still can save quite a bit when you have nearly-identical files.
        • bewuethr4 hours ago
          Exactly, a tiny change in a large file produces a full new blob, but is stored very efficiently as a delta in a packfile.
  • grumbelbart26 hours ago
    Did you do —apparent-size?
    • SushiHippie2 hours ago
      The -b option is equivalent to &#x27;--apparent-size --block-size=1&#x27;
  • dhruv_kernlai1 hour ago
    [flagged]
  • llj1237 hours ago
    [dead]