From: Johannes Berg Date: Tue, 29 Dec 2020 22:28:34 +0000 (+0100) Subject: get: remove pointless git.repo() call X-Git-Tag: 0.32~6 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=6d58d372a7a1a37e01399d6d1fe38ceb4f60ea44 get: remove pointless git.repo() call 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 --- diff --git a/lib/cmd/get-cmd.py b/lib/cmd/get-cmd.py index 4880cbf..7fc741e 100755 --- a/lib/cmd/get-cmd.py +++ b/lib/cmd/get-cmd.py @@ -587,7 +587,6 @@ def main(): 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: @@ -600,7 +599,7 @@ def main(): 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