print('Repacking git repo: %s' % ' '.join(cmd))
subprocess.check_call(cmd, cwd='/')
+ # Clean empty dirs.
+ cmd = ['find', rundir, '-depth', '-type', 'd', '-exec', 'rmdir', '{}', '+']
+ subprocess.call(cmd, stderr=open('/dev/null', 'w'))
+
if tmpdir:
cmd = ['rsync', '-a', '--delete', tmpdir + '/', path + '/']
print('Syncing back git repo: %s' % ' '.join(cmd))