There's no point in doing "opt.source or git.repo()" since
we just pass the result to LocalRepo(), which already does
exactly the same thing.
Remove the src_dir variable entirely.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
git.check_repo_or_die()
if opt.source:
opt.source = argv_bytes(opt.source)
git.check_repo_or_die()
if opt.source:
opt.source = argv_bytes(opt.source)
- src_dir = opt.source or git.repo()
if opt.bwlimit:
client.bwlimit = parse_num(opt.bwlimit)
if is_reverse and opt.remote:
if opt.bwlimit:
client.bwlimit = parse_num(opt.bwlimit)
if is_reverse and opt.remote:
dest_repo = LocalRepo()
with dest_repo as dest_repo:
dest_repo = LocalRepo()
with dest_repo as dest_repo:
- with LocalRepo(repo_dir=src_dir) as src_repo:
+ with LocalRepo(repo_dir=opt.source) as src_repo:
with dest_repo.new_packwriter(compression_level=opt.compress) as writer:
# Resolve and validate all sources and destinations,
# implicit or explicit, and do it up-front, so we can
with dest_repo.new_packwriter(compression_level=opt.compress) as writer:
# Resolve and validate all sources and destinations,
# implicit or explicit, and do it up-front, so we can