mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +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
|
commit.dumped = 2
|
||||||
|
|
||||||
def gather_data(args):
|
def gather_data(args):
|
||||||
|
blob_size_progress = ProgressWriter()
|
||||||
|
num_blobs = 0
|
||||||
|
|
||||||
# Get sizes of blobs by sha1
|
# Get sizes of blobs by sha1
|
||||||
a='--batch-check=%(objectname) %(objecttype) %(objectsize) %(objectsize:disk)'
|
a='--batch-check=%(objectname) %(objecttype) %(objectsize) %(objectsize:disk)'
|
||||||
cf = subprocess.Popen(['git', 'cat-file', '--batch-all-objects', a],
|
cf = subprocess.Popen(['git', 'cat-file', '--batch-all-objects', a],
|
||||||
@ -1846,6 +1849,10 @@ def gather_data(args):
|
|||||||
if objtype == 'blob':
|
if objtype == 'blob':
|
||||||
unpacked_size[sha] = objsize
|
unpacked_size[sha] = objsize
|
||||||
packed_size[sha] = objdisksize
|
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),
|
stats = {'names': collections.defaultdict(set),
|
||||||
'allnames' : set(),
|
'allnames' : set(),
|
||||||
'deletions': {},
|
'deletions': {},
|
||||||
@ -1878,7 +1885,6 @@ def gather_data(args):
|
|||||||
output.close()
|
output.close()
|
||||||
if fep.wait():
|
if fep.wait():
|
||||||
raise SystemExit("Error: fast-export failed; see above.")
|
raise SystemExit("Error: fast-export failed; see above.")
|
||||||
cf.wait()
|
|
||||||
|
|
||||||
def do_analysis(args, git_dir):
|
def do_analysis(args, git_dir):
|
||||||
# Create the report file as necessary
|
# Create the report file as necessary
|
||||||
|
Loading…
Reference in New Issue
Block a user