From becc29a9bd03b13a605d9cc7e048f5e312dbbb1a Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 27 Nov 2018 10:00:45 -0800 Subject: [PATCH] filter-repo: show progress parsing blob sizes Signed-off-by: Elijah Newren --- git-filter-repo | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git-filter-repo b/git-filter-repo index 1cf8ad4..9f4038a 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -1834,6 +1834,9 @@ def analyze_commit(args, commit): commit.dumped = 2 def gather_data(args): + blob_size_progress = ProgressWriter() + num_blobs = 0 + # Get sizes of blobs by sha1 a='--batch-check=%(objectname) %(objecttype) %(objectsize) %(objectsize:disk)' cf = subprocess.Popen(['git', 'cat-file', '--batch-all-objects', a], @@ -1846,6 +1849,10 @@ def gather_data(args): if objtype == 'blob': unpacked_size[sha] = objsize packed_size[sha] = objdisksize + num_blobs += 1 + blob_size_progress.show("Processed {} blob sizes".format(num_blobs)) + cf.wait() + blob_size_progress.finish() stats = {'names': collections.defaultdict(set), 'allnames' : set(), 'deletions': {}, @@ -1878,7 +1885,6 @@ def gather_data(args): output.close() if fep.wait(): raise SystemExit("Error: fast-export failed; see above.") - cf.wait() def do_analysis(args, git_dir): # Create the report file as necessary