From: Andrej Shadura Date: Sun, 7 Feb 2021 18:31:23 +0000 (+0100) Subject: clone: Don’t check out the Debian branch if it doesn’t exist X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d2178950bec2d96a064bd0fd33d702cad4a69c2;p=tools%2Fgit-buildpackage.git clone: Don’t check out the Debian branch if it doesn’t exist Signed-off-by: Andrej Shadura --- diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py index b17241b6..7894b618 100755 --- a/gbp/scripts/clone.py +++ b/gbp/scripts/clone.py @@ -204,7 +204,8 @@ def main(argv): not repo.has_branch(branch)): repo.create_branch(branch, remote) - repo.set_branch(options.debian_branch) + if repo.has_branch(options.debian_branch, remote=True): + repo.set_branch(options.debian_branch) repo_setup.set_user_name_and_email(options.repo_user, options.repo_email, repo)