Commit 94a54c8f authored by Kirill Smelkov's avatar Kirill Smelkov

restore: x_heads_sha1 is the same as repo_sha1_heads

No need to compute that twice. My mistake from original 6f237f22
(git-backup: Initial draft).
parent 21bed0c6
......@@ -729,11 +729,9 @@ def cmd_restore_(HEAD, restorespecv):
#
# Compared to fsck we do not re-compute sha1 sum of objects which
# is significantly faster.
x_heads_sha1 = set(_.sha1 for _ in repo_refs.values())
x_heads_sha1 = '\n'.join(x_heads_sha1)
try:
xgit('--git-dir=%s' % repopath,
'rev-list', '--objects', '--stdin', '--quiet', stdin=x_heads_sha1)
'rev-list', '--objects', '--stdin', '--quiet', stdin=repo_sha1_heads)
except:
print >>sys.stderr, 'E: Problem while checking connectivity of extracted repo:'
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment