From bcc283e986bdffdf356ae93a3db2e4e15386007b Mon Sep 17 00:00:00 2001 From: David Boreham Date: Wed, 24 May 2023 19:57:07 -0600 Subject: [PATCH] Fix logic for branch switch --- app/setup_repositories.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/setup_repositories.py b/app/setup_repositories.py index f6ee1e02..bfcbe0ec 100644 --- a/app/setup_repositories.py +++ b/app/setup_repositories.py @@ -121,9 +121,8 @@ def process_repo(verbose, quiet, dry_run, pull, check_only, git_ssh, dev_root_pa else: branch_to_checkout = repo_branch - print(f"branch_to_checkout: {branch_to_checkout}") if branch_to_checkout: - if current_repo_branch and (current_repo_branch != branch_to_checkout): + if current_repo_branch is None or (current_repo_branch and (current_repo_branch != branch_to_checkout)): if not quiet: print(f"switching to branch {branch_to_checkout} in repo {repo_path}") git_repo = git.Repo(full_filesystem_repo_path)