From b8ef0b937748b2580af4d588c56c862e8af06481 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Mon, 3 Nov 2025 08:27:20 -0300 Subject: [PATCH] bugfix: uso distintos target branches para obtener env y type de ramas dev y release --- git-flow | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/git-flow b/git-flow index 55c5939..706ce53 100755 --- a/git-flow +++ b/git-flow @@ -232,6 +232,8 @@ def merge_command(): return (target, _) = get_branch_env_and_type(branch) + print_info("target branch: " + target) + return status = Git.status() remote = Git.flow_config("flow.remote").firstline() @@ -316,13 +318,7 @@ def parse_url(url: str) -> list[str]: def get_branch_env_and_type(branch: str) -> tuple[str, str]: components = branch.split("/") - target_branches = ( - Git.flow_config("flow.branches") - .firstline() # dev test main - .split(" ") # [dev, test, main] - [1:] # [test, main] (dev no deberia ser un release) - ) - + target_branches = Git.flow_config("flow.branches").firstline().split(" ") if len(components) == 2: if components[0] not in BRANCH_TYPES: @@ -330,6 +326,8 @@ def get_branch_env_and_type(branch: str) -> tuple[str, str]: return (target_branches[0], components[0]) elif len(components) == 4: + target_branches = target_branches[1:] + if ( components[0] != "release" or components[1] not in target_branches