filter-repo: show progress parsing blob sizes

Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
Elijah Newren 2018-11-27 10:00:45 -08:00
parent aa7eebbc88
commit becc29a9bd

View File

@ -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