stop_at = lambda x: x.decode('hex') in trees_visited
approx_live_count = 0
for ref_name, ref_id in git.list_refs():
- for item in walk_object(cat_pipe, ref_id.encode('hex'),
+ for item in walk_object(cat_pipe.get, ref_id.encode('hex'),
stop_at=stop_at,
include_data=None):
# FIXME: batch ids
bloom.clear_bloom(packdir)
if verbosity: log('clearing reflog\n')
expirelog_cmd = ['git', 'reflog', 'expire', '--all', '--expire=all']
- expirelog = subprocess.Popen(expirelog_cmd, preexec_fn = git._gitenv())
+ expirelog = subprocess.Popen(expirelog_cmd, env=git._gitenv())
git._git_wait(' '.join(expirelog_cmd), expirelog)
if verbosity: log('removing unreachable data\n')
sweep(live_objects, existing_count, cat_pipe,