feature: agregando descripcion a ejecucion de comandos importantes en init y commit
This commit is contained in:
@@ -18,8 +18,8 @@ class CommitCommand(Command):
|
||||
|
||||
if not self._has_files_staged():
|
||||
self.warning("No hay cambios en el indice para commitear.")
|
||||
if self.confirm("¿Desea agregar la carpeta actual (`git add .`)?"):
|
||||
Git("add", ".").exec()
|
||||
if self.confirm("¿Desea agregar la carpeta actual?"):
|
||||
Git("add", ".").exec(print="Agregando cambios")
|
||||
else:
|
||||
raise GitFlowError(
|
||||
"Debe agregar algún cambio al indice para continuar."
|
||||
@@ -33,19 +33,19 @@ class CommitCommand(Command):
|
||||
|
||||
if branch.startswith("wip/"):
|
||||
original_branch = branch.removeprefix("wip/")
|
||||
Git("commit", m=message).exec()
|
||||
Git("commit", m=message).exec(print="Creando commit en rama WIP")
|
||||
|
||||
if commit_type != "wip":
|
||||
suffix = datetime.now().strftime("%Y%m%dT%H%M")
|
||||
Git("switch", original_branch).exec()
|
||||
Git("merge", branch, squash=True).exec()
|
||||
Git("commit", m=message).exec()
|
||||
Git("branch", branch, "trash/" + branch + "/" + suffix, move=True).exec()
|
||||
Git("switch", original_branch).exec(print="Volviendo a rama original")
|
||||
Git("merge", branch, squash=True).exec(print="Squasheando commits WIP en uno solo")
|
||||
Git("commit", m=message).exec(print="Creando commit final de rama WIP")
|
||||
Git("branch", branch, "trash/" + branch + "/" + suffix, move=True).exec(print="Backup de rama WIP")
|
||||
else:
|
||||
if commit_type == "wip":
|
||||
Git("switch", "wip/" + branch, create=True).exec()
|
||||
Git("switch", "wip/" + branch, create=True).exec(print="Creando nueva rama WIP")
|
||||
|
||||
Git("commit", m=message).exec()
|
||||
Git("commit", m=message).exec(print="Creando commit")
|
||||
|
||||
def _has_files_staged(self):
|
||||
status = Git.status()
|
||||
|
||||
Reference in New Issue
Block a user