Progress indicator for git clone

Not really. There are various stages to git clone:

  1. discover the objects that need to be sent (“Counting objects: nnn”)
  2. compress and send those objects
  3. index the received pack
  4. check out received files

Stage 1 involves walking through the commit graph from each branch head finding all the commits and associated objects: since there is no idea beforehand of how many commits there are, the progress of this can’t be gauged. Sadly this is often where a lot of the time in a clone operation is taken up.

Stage 2 does have a progress counter, although it counts objects rather than volume (so its rate varies, especially if the repo has large blobs)

Stages 3 and 4 have progress counters, although they are usually much faster than the previous two stages.

Leave a Comment