git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: jidanni@jidanni.org
Cc: git@vger.kernel.org
Subject: Re: git-clone --how-much-disk-space-will-this-cost-me? [--depth n]
Date: Mon, 15 Dec 2008 19:43:40 -0500	[thread overview]
Message-ID: <20081216004339.GA3679@coredump.intra.peff.net> (raw)
In-Reply-To: <878wqhxaex.fsf@jidanni.org>

On Tue, Dec 16, 2008 at 07:53:42AM +0800, jidanni@jidanni.org wrote:

> The git-clone manpage should mention how to determine how much disk
> space will be used.

OK. Do you have a suggestion for how to figure that out?

> Let's take a look at those messages while were at it,
> $ git-clone --depth 1 git://git.sv.gnu.org/coreutils/
> Initialized empty Git repository in /usr/local/src/jidanni/coreutils/.git/
> remote: Counting objects: 26240, done.
> remote: Compressing objects: 100% (14001/14001), done.
> remote: Total 26240 (delta 21577), reused 15354 (delta 12095)
> Receiving objects: 100% (26240/26240), 15.76 MiB | 26 KiB/s, done.
> Resolving deltas: 100% (21577/21577), done.
> $ du -sh
> 27M  .
> Nope, nowhere does it directly say "You Holmes, are in for 27
> Megabytes (on your piddly modem)". There obviously is math involved to
> figure it out... math!

That's because we don't know that it will be 27 megabytes. That progress
counter is counting the number of _objects_, not bytes. So you can make
a rough estimate, but only after receiving some objects, and even then
it can be wildly off (because you are assuming the size of the objects
still to get averages the same as the size of the objects you have
already gotten).

AFAIK, nowhere in the sent data is there an indication of how many bytes
are in the resulting pack (and in many cases, the pack is generated on
the fly and the information not only is not sent, but is not available
anywhere).

-Peff

      parent reply	other threads:[~2008-12-16  0:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 23:53 git-clone --how-much-disk-space-will-this-cost-me? [--depth n] jidanni
2008-12-16  0:22 ` Jean-Luc Herren
2008-12-16  0:37   ` jidanni
2008-12-16  2:07     ` Jean-Luc Herren
2008-12-16  5:45       ` Nicolas Pitre
2008-12-17 15:44         ` Shawn O. Pearce
2008-12-17 16:15           ` Nicolas Pitre
2008-12-17 16:21             ` Shawn O. Pearce
2008-12-17 16:46               ` Nicolas Pitre
2008-12-17 16:48                 ` Shawn O. Pearce
2008-12-17 16:56                   ` Nicolas Pitre
2008-12-16  0:43 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081216004339.GA3679@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).