Closed
Description
In the docs and in the code types, the first argument for repo.index.add()
is Sequence[Union[str, os.PathLike, git.objects.blob.Blob, git.index.typ.BaseIndexEntry, Submodule]]
.
However, actually trying to submit a list of Paths to this argument results in a TypeError, as it seems the code inside _preprocess_add_items
does not handle Paths.
I think this could be fixed by changing line 611 inside of _preprocess_add_items
in base.py
to:
if isinstance(item, str) or isinstance(item, os.PathLike):
Line 611 in fe54118
Since
_to_relative_path()
already accepts pathlike arguments.