From 1d186e117cee810f3347659784f5cc1ae3a63d82 Mon Sep 17 00:00:00 2001 From: Jonathan Teran Carballo Date: Thu, 16 Jul 2026 21:47:27 -0300 Subject: [PATCH] refactor: reword current branch check, move if around so it's better placed --- src/git_flow/command/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/git_flow/command/base.py b/src/git_flow/command/base.py index 8e9026b..342cc33 100644 --- a/src/git_flow/command/base.py +++ b/src/git_flow/command/base.py @@ -48,7 +48,7 @@ def ensure_right_branch(): if branch == "HEAD": raise GitFlowError("No se encuentra parado sobre una rama.") - elif io_confirm(f"Se encuentra sobre la rama '{branch}'. ¿Es correcto?"): + elif io_confirm(f"Rama actual: {branch}. ¿Es correcto?"): return branch else: raise GitFlowError("Ejecución cancelada.") @@ -103,12 +103,12 @@ def ensure_clean_worktree(has_remote: bool): if not_empty: if not has_remote: io_warning("Existen cambios en tu entorno de trabajo sin commitear.") + + if not io_confirm("¿Desea continuar?", False): + raise GitFlowError("Ejecución abortada") else: raise GitFlowError("No se puede continuar con cambios pendientes.") - if not io_confirm("¿Desea continuar?", False): - raise GitFlowError("Ejecución abortada") - def get_remote_api(token: str) -> RemoteAPI: if "flow.remote" not in flowconfig: