pack-objects: show some progress when counting kept objects
commit5af050437af1c061804b4317154085c65490bbac
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 15 Apr 2018 15:36:18 +0000 (15 17:36 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Apr 2018 04:52:29 +0000 (16 13:52 +0900)
tree0d23bdc726188b7415599ee40db60b3ed34df13f
parent9806f5a7bf3d02247c2c500ef74f56213cd7b07a
pack-objects: show some progress when counting kept objects

We only show progress when there are new objects to be packed. But
when --keep-pack is specified on the base pack, we will exclude most
of objects. This makes 'pack-objects' stay silent for a long time
while the counting phase is going.

Let's show some progress whenever we visit an object instead. The old
"Counting objects" is renamed to "Enumerating objects" and a new
progress "Counting objects" line is added.

This new "Counting objects" line should progress pretty quick when the
system is beefy. But when the system is under pressure, the reading
object header done in this phase could be slow and showing progress is
an improvement over staying silent in the current code.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c