Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork940
Closed
Labels
Description
In the docs and in the code types, the first argument forrepo.index.add()
isSequence[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
inbase.py
to:
if isinstance(item, str) or isinstance(item, os.PathLike):
Line 611 infe54118
ifisinstance(item,str): |
Since
_to_relative_path()
already accepts pathlike arguments.