feature: show table with staged changes before comit

This commit is contained in:
jt
2026-09-28 14:22:49 -03:00
parent aacc5b90e2
commit e13beae279
2 changed files with 48 additions and 9 deletions
+4 -3
View File
@@ -26,8 +26,9 @@ class Git:
file: str
def __init__(self, line: str) -> None:
self.worktree = line[0]
self.index = line[1]
# Formato porcelain "XY <file>": X es el estado en el indice, Y en el worktree
self.index = line[0]
self.worktree = line[1]
self.file = line[3:].strip("\n")
command: list[str]
@@ -170,7 +171,7 @@ class Git:
process = self._get(**kwargs)
lines = process.stdout.splitlines()
return lines if not strip else list(map(lambda l: l.strip(), lines))
return lines if not strip else [l.strip() for l in lines]
def firstline(self, **kwargs):
lines = self.lines(**kwargs)