refactor: reword current branch check, move if around so it's better placed
This commit is contained in:
@@ -48,7 +48,7 @@ def ensure_right_branch():
|
|||||||
|
|
||||||
if branch == "HEAD":
|
if branch == "HEAD":
|
||||||
raise GitFlowError("No se encuentra parado sobre una rama.")
|
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
|
return branch
|
||||||
else:
|
else:
|
||||||
raise GitFlowError("Ejecución cancelada.")
|
raise GitFlowError("Ejecución cancelada.")
|
||||||
@@ -103,12 +103,12 @@ def ensure_clean_worktree(has_remote: bool):
|
|||||||
if not_empty:
|
if not_empty:
|
||||||
if not has_remote:
|
if not has_remote:
|
||||||
io_warning("Existen cambios en tu entorno de trabajo sin commitear.")
|
io_warning("Existen cambios en tu entorno de trabajo sin commitear.")
|
||||||
|
|
||||||
|
if not io_confirm("¿Desea continuar?", False):
|
||||||
|
raise GitFlowError("Ejecución abortada")
|
||||||
else:
|
else:
|
||||||
raise GitFlowError("No se puede continuar con cambios pendientes.")
|
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:
|
def get_remote_api(token: str) -> RemoteAPI:
|
||||||
if "flow.remote" not in flowconfig:
|
if "flow.remote" not in flowconfig:
|
||||||
|
|||||||
Reference in New Issue
Block a user