feature: agrego soporte para parametros repetidos en llamadas a Git

This commit is contained in:
jt
2025-11-23 18:49:42 -03:00
parent 82b9a70400
commit eafb3f1b31
+4 -1
View File
@@ -89,7 +89,7 @@ class Git:
def is_repository() -> bool:
return Git("rev-parse", is_inside_work_tree=True).code() == 0
def __init__(self, subcommand: str, *args: str, **kwargs: str | int | bool | None) -> None:
def __init__(self, subcommand: str, *args: str, **kwargs: str | int | bool | list[str] | None) -> None:
self.command = ["git", subcommand]
for option, value in kwargs.items():
@@ -103,6 +103,9 @@ class Git:
self.command.append(prefix + option)
elif value is None:
continue
elif isinstance(value, list):
for v in value:
self.command.append("--" + option + "=" + v)
else:
value = value if isinstance(value, str) else str(value)