From 7b4fb34ef357c692172258b431c1f486ed615751 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Thu, 11 Dec 2025 15:15:45 -0300 Subject: [PATCH] bugfix: cambio la forma en la que se obtiene el first fork point entre 2 ramas --- src/git_flow/git.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/git_flow/git.py b/src/git_flow/git.py index f6137a1..1224106 100644 --- a/src/git_flow/git.py +++ b/src/git_flow/git.py @@ -63,19 +63,13 @@ class Git: @staticmethod def get_first_fork_point(branch: str, env: str): - boundary_commits = list( - filter( - lambda c: c.startswith("-"), # boundary commits - Git( - "rev-list", env + "..." + branch, topo_order=True, boundary=True - ).lines(), - ) - ) + # Lista de commits alcanzables por el entorno (por ejemplo, dev), + env_commits = Git("rev-list", env + "..." + branch, first_parent=True).lines() - if not boundary_commits: + if not env_commits: raise RuntimeError("No se encontro un commit base para realizar el rebase.") - return boundary_commits[-1].removeprefix("-") + return Git("show", env_commits[-1] + "^", patch=False, format="%h").firstline() @staticmethod def _get_references(kind: str):