Coder Social home page Coder Social logo

Comments (4)

mhagger avatar mhagger commented on May 28, 2024

A good estimate for the repository size shown by GitHub would be to make sure that your repo is garbage-collected and then sum up the size of the packfiles under .git/objects/pack. This is an oversimplification and gets more complicated if your repo is a fork of another, and it also depends on how well packed the repository happens to be on our servers, and includes the references that are used to manage pull requests. But it should give you the right ballpark.

This is not something that git-sizer can currently approximate because it currently only considers the logical size of the repository, not the size on disk.

from git-sizer.

impredicative avatar impredicative commented on May 28, 2024

Okay, and which of maxCheckoutBlobSize.value and uniqueBlobSize.value would be a better approximation for it? Or does it depend on other factors? I'm just trying to understand.

from git-sizer.

mhagger avatar mhagger commented on May 28, 2024

Okay, and which of maxCheckoutBlobSize.value and uniqueBlobSize.value would be a better approximation for it? Or does it depend on other factors?

In a normal repository, uniqueBlobSize.value or possibly the sum uniqueBlobSize.value + uniqueTreeSize.value + uniqueCommitSize.value + uniqueTagSize.value would probably be correlated with the repository's on-disk size. But the sum will usually be a lot larger because on disk, Git goes to a lot of work to store things efficiently, for example storing multiple versions of a file as deltas against each other and then compressing the result. How well this deltaing and compression works varies dramatically across repositories.

from git-sizer.

impredicative avatar impredicative commented on May 28, 2024

For convenience, is it possible for git-sizer to similarly have a totalSize.value which is this sum? It could be helpful.

from git-sizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.