pack-objects: show reused packfile objects in "Counting objects"
commit78d2214eb4d10ea1e30dd7e69a4e6d73d9f66164
authorJeff King <peff@peff.net>
Sat, 15 Mar 2014 02:26:58 +0000 (14 22:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Mar 2014 22:01:27 +0000 (17 15:01 -0700)
tree82752edf18c40cf738ac52c8bb362de1446e7a75
parent657673f125008da1ef92d2054c9536722c42f73b
pack-objects: show reused packfile objects in "Counting objects"

When we are sending a pack for push or fetch, we may reuse a
chunk of packfile without even parsing it. The progress
meter then looks like this:

  Reusing existing pack: 3440489, done.
  Counting objects: 3, done.

The first line shows that we are reusing a large chunk of
objects, and then we further count any objects not included
in the reused portion with an actual traversal.

These are all implementation details that the user does not
need to care about. Instead, we can show the reused objects
in the normal "counting..." progress meter (which will
simply go much faster than normal), and then continue to add
to it as we traverse.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c