From e9f14c2af9a8c533b98642874fdd744225edf65b Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Mon, 29 Jun 2026 03:22:58 -0400 Subject: [PATCH] [FIX] script todo upgrade: don't create branch if already exist --- script/todo/todo_upgrade.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/todo/todo_upgrade.py b/script/todo/todo_upgrade.py index b06a78c..d77b6dc 100755 --- a/script/todo/todo_upgrade.py +++ b/script/todo/todo_upgrade.py @@ -2038,7 +2038,9 @@ class TodoUpgrade: if not has_existing_target_branch: cmd_git_clone = ( f"cd {target_addons_path} " - f"&& git checkout -b {branch_target} && cd ~-" + f"&& if git rev-parse --verify --quiet refs/heads/{branch_target}; then " + f"git checkout {branch_target}; else git checkout -b {branch_target}; fi " + f"&& cd ~-" ) status, cmd_executed, lst_output = self.todo_upgrade_execute( cmd_git_clone,