Re: [PATCH] prune: show progress while marking reachable objects
From: Jeff King <hidden>
Date: 2016-06-15 22:52:26
On Sat, Nov 05, 2011 at 07:00:08PM +0700, Nguyen Thai Ngoc Duy wrote:
prune already shows progress meter while pruning. The marking part may take a few seconds or more, depending on repository size. Show progress meter during this time too.
Thanks, this is a nice start. It's missing a few things IMHO:
1. It actually counts commits, not all objects. I'm tempted to say
this doesn't matter, as any eye candy is helpful. Except that the
most common use of prune is as part of "git gc", in which case
pack-objects will have just done the "counting objects" phase and
come up with some number. If we count all objects, then our end
number is the same (modulo any .keep packs, but at least it's
probably in the same order of magnitude). That gives the user a
better sense of completion time.
2. Prune should learn --progress/--no-progress, isatty(2), etc. And
git-gc should pass --no-progress when it's told to be quiet.
Patches for both in a moment.
-Peff