commit-graph write: add "Writing out" progress output
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 19 Jan 2019 20:21:15 +0000 (21:21 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Jan 2019 21:14:08 +0000 (13:14 -0800)
commit53035c4f0b06c7e556ab35acb2ce3aff1ba3ff5d
tree959893de1f5a931743293c0142d977c8a9101f29
parent857ba928a4125251f2b4a728ff8021d2adcdbd91
commit-graph write: add "Writing out" progress output

Add progress output to be shown when we're writing out the
commit-graph, this adds to the output already added in 7b0f229222
("commit-graph write: add progress output", 2018-09-17).

As noted in that commit most of the progress output isn't displayed on
small repositories, but before this change we'd noticeably hang for
2-3 seconds at the end on medium sized repositories such as linux.git.

Now we'll instead show output like this, and reduce the
human-observable times at which we're not producing progress output:

    $ ~/g/git/git --exec-path=$HOME/g/git -C ~/g/2015-04-03-1M-git commit-graph write
    Finding commits for commit graph: 13064614, done.
    Expanding reachable commits in commit graph: 1000447, done.
    Computing commit graph generation numbers: 100% (1000447/1000447), done.
    Writing out commit graph: 100% (3001341/3001341), done.

This "Writing out" number is 3x or 4x the number of commits, depending
on the graph we're processing. A later change will make this explicit
to the user.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c