mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-04 01:15:41 +02:00
filter-repo: show progress parsing blob sizes
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
aa7eebbc88
commit
becc29a9bd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user